Skip to content

Synthetic Users API

All URIs are relative to https://api.syntheticusers.com/api/v1

MethodHTTP requestDescription
delete_synthetic_userDELETE /syntheticUsers/Delete Synthetic User
edit_synthetic_userPATCH /syntheticUsers/Edit Synthetic User
get_synthetic_userGET /syntheticUsers/Get Synthetic User
list_synthetic_usersGET /syntheticUsersList Synthetic Users
regenerate_synthetic_userPOST /syntheticUsers/{synthetic_user_id}/regenerateRegenerate Synthetic User

delete_synthetic_user

object delete_synthetic_user(synthetic_user_id)

Delete Synthetic User

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.SyntheticUsersApi(api_client)
    synthetic_user_id = 'synthetic_user_id_example' # str | 

    try:
        # Delete Synthetic User
        api_response = api_instance.delete_synthetic_user(synthetic_user_id)
        print("The response of SyntheticUsersApi->delete_synthetic_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SyntheticUsersApi->delete_synthetic_user: %s\n" % e)

Parameters

NameTypeDescriptionNotes
synthetic_user_idstr

Return type

object

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
422Validation Error-

[Back to top] [Back to API list] [Back to SDK]

edit_synthetic_user

SyntheticUser edit_synthetic_user(synthetic_user_id, synthetic_user_partial)

Edit Synthetic User

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.synthetic_user import SyntheticUser
from syntheticusers.models.synthetic_user_partial import SyntheticUserPartial
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.SyntheticUsersApi(api_client)
    synthetic_user_id = 'synthetic_user_id_example' # str | 
    synthetic_user_partial = syntheticusers.SyntheticUserPartial() # SyntheticUserPartial | 

    try:
        # Edit Synthetic User
        api_response = api_instance.edit_synthetic_user(synthetic_user_id, synthetic_user_partial)
        print("The response of SyntheticUsersApi->edit_synthetic_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SyntheticUsersApi->edit_synthetic_user: %s\n" % e)

Parameters

NameTypeDescriptionNotes
synthetic_user_idstr
synthetic_user_partialSyntheticUserPartial

Return type

SyntheticUser

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
422Validation Error-

[Back to top] [Back to API list] [Back to SDK]

get_synthetic_user

SyntheticUser get_synthetic_user(synthetic_user_id)

Get Synthetic User

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.synthetic_user import SyntheticUser
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.SyntheticUsersApi(api_client)
    synthetic_user_id = 'synthetic_user_id_example' # str | 

    try:
        # Get Synthetic User
        api_response = api_instance.get_synthetic_user(synthetic_user_id)
        print("The response of SyntheticUsersApi->get_synthetic_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SyntheticUsersApi->get_synthetic_user: %s\n" % e)

Parameters

NameTypeDescriptionNotes
synthetic_user_idstr

Return type

SyntheticUser

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
422Validation Error-

[Back to top] [Back to API list] [Back to SDK]

list_synthetic_users

PageSyntheticUser list_synthetic_users(id=id, project_id=project_id, audience_id=audience_id, status=status, page=page, size=size)

List Synthetic Users

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.page_synthetic_user import PageSyntheticUser
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.SyntheticUsersApi(api_client)
    id = 'id_example' # str | Comma-separated list of synthetic user IDs (optional)
    project_id = 'project_id_example' # str | Comma-separated list of project IDs (optional)
    audience_id = 'audience_id_example' # str | Comma-separated list of synthetic user IDs (optional)
    status = 'status_example' # str | Status to filter by (optional)
    page = 1 # int | Page number (optional) (default to 1)
    size = 50 # int | Page size (optional) (default to 50)

    try:
        # List Synthetic Users
        api_response = api_instance.list_synthetic_users(id=id, project_id=project_id, audience_id=audience_id, status=status, page=page, size=size)
        print("The response of SyntheticUsersApi->list_synthetic_users:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SyntheticUsersApi->list_synthetic_users: %s\n" % e)

Parameters

NameTypeDescriptionNotes
idstrComma-separated list of synthetic user IDs[optional]
project_idstrComma-separated list of project IDs[optional]
audience_idstrComma-separated list of synthetic user IDs[optional]
statusstrStatus to filter by[optional]
pageintPage number[optional] [default to 1]
sizeintPage size[optional] [default to 50]

Return type

PageSyntheticUser

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
422Validation Error-

[Back to top] [Back to API list] [Back to SDK]

regenerate_synthetic_user

SyntheticUser regenerate_synthetic_user(synthetic_user_id)

Regenerate Synthetic User

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.synthetic_user import SyntheticUser
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.SyntheticUsersApi(api_client)
    synthetic_user_id = 'synthetic_user_id_example' # str | 

    try:
        # Regenerate Synthetic User
        api_response = api_instance.regenerate_synthetic_user(synthetic_user_id)
        print("The response of SyntheticUsersApi->regenerate_synthetic_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SyntheticUsersApi->regenerate_synthetic_user: %s\n" % e)

Parameters

NameTypeDescriptionNotes
synthetic_user_idstr

Return type

SyntheticUser

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
422Validation Error-

[Back to top] [Back to API list] [Back to SDK]

Released under the MIT License.