Appearance
Plans API
All URIs are relative to https://api.syntheticusers.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| create_plan | POST /plans | Create Plan |
| delete_plan | DELETE /plans/ | Delete Plan |
| get_plan | GET /plans/ | Get Plan |
| list_plans | GET /plans | List Plans |
| update_plan | PATCH /plans/ | Update Plan |
create_plan
Plan create_plan(plan_create)
Create Plan
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.plan import Plan
from syntheticusers.models.plan_create import PlanCreate
from syntheticusers.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.syntheticusers.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = syntheticusers.Configuration(
host = "https://api.syntheticusers.com/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
configuration = syntheticusers.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with syntheticusers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = syntheticusers.PlansApi(api_client)
plan_create = syntheticusers.PlanCreate() # PlanCreate |
try:
# Create Plan
api_response = api_instance.create_plan(plan_create)
print("The response of PlansApi->create_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PlansApi->create_plan: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| plan_create | PlanCreate |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to SDK]
delete_plan
object delete_plan(plan_id)
Delete Plan
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.syntheticusers.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = syntheticusers.Configuration(
host = "https://api.syntheticusers.com/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
configuration = syntheticusers.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with syntheticusers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = syntheticusers.PlansApi(api_client)
plan_id = 'plan_id_example' # str |
try:
# Delete Plan
api_response = api_instance.delete_plan(plan_id)
print("The response of PlansApi->delete_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PlansApi->delete_plan: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| plan_id | str |
Return type
object
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to SDK]
get_plan
Plan get_plan(plan_id)
Get Plan
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.plan import Plan
from syntheticusers.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.syntheticusers.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = syntheticusers.Configuration(
host = "https://api.syntheticusers.com/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
configuration = syntheticusers.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with syntheticusers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = syntheticusers.PlansApi(api_client)
plan_id = 'plan_id_example' # str |
try:
# Get Plan
api_response = api_instance.get_plan(plan_id)
print("The response of PlansApi->get_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PlansApi->get_plan: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| plan_id | str |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to SDK]
list_plans
PagePlan list_plans(id=id, project_id=project_id, page=page, size=size)
List Plans
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.page_plan import PagePlan
from syntheticusers.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.syntheticusers.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = syntheticusers.Configuration(
host = "https://api.syntheticusers.com/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
configuration = syntheticusers.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with syntheticusers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = syntheticusers.PlansApi(api_client)
id = 'id_example' # str | Comma-separated list of plans IDs (optional)
project_id = 'project_id_example' # str | Comma-separated list of project IDs (optional)
page = 1 # int | Page number (optional) (default to 1)
size = 50 # int | Page size (optional) (default to 50)
try:
# List Plans
api_response = api_instance.list_plans(id=id, project_id=project_id, page=page, size=size)
print("The response of PlansApi->list_plans:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PlansApi->list_plans: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Comma-separated list of plans IDs | [optional] |
| project_id | str | Comma-separated list of project IDs | [optional] |
| page | int | Page number | [optional] [default to 1] |
| size | int | Page size | [optional] [default to 50] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to SDK]
update_plan
Plan update_plan(plan_id, plan_update)
Update Plan
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.plan import Plan
from syntheticusers.models.plan_update import PlanUpdate
from syntheticusers.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.syntheticusers.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = syntheticusers.Configuration(
host = "https://api.syntheticusers.com/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
configuration = syntheticusers.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with syntheticusers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = syntheticusers.PlansApi(api_client)
plan_id = 'plan_id_example' # str |
plan_update = syntheticusers.PlanUpdate() # PlanUpdate |
try:
# Update Plan
api_response = api_instance.update_plan(plan_id, plan_update)
print("The response of PlansApi->update_plan:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PlansApi->update_plan: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| plan_id | str | ||
| plan_update | PlanUpdate |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |