Skip to content

Sub Plans API

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

MethodHTTP requestDescription
create_subplanPOST /subplansCreate Subplan
delete_subplanDELETE /subplans/Delete Subplan
execute_subplanPOST /subplans/{subplan_id}/executeExecute Subplan
extend_subplanPOST /subplans/{subplan_id}/extendExtend Subplan
generate_subplan_reportPOST /subplans/{subplan_id}/reportGenerate Subplan Report
get_report_pdfGET /subplans/{subplan_id}/report/{report_id}/pdfGet Report Pdf
get_subplanGET /subplans/Get Subplan
list_subplansGET /subplansList Subplans
subplan_follow_upPOST /subplans/{subplan_id}/follow_upSubplan Follow Up
update_subplanPATCH /subplans/Update Subplan

create_subplan

SubPlan create_subplan(sub_plan_create)

Create Subplan

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.sub_plan import SubPlan
from syntheticusers.models.sub_plan_create import SubPlanCreate
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.SubPlansApi(api_client)
    sub_plan_create = syntheticusers.SubPlanCreate() # SubPlanCreate | 

    try:
        # Create Subplan
        api_response = api_instance.create_subplan(sub_plan_create)
        print("The response of SubPlansApi->create_subplan:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubPlansApi->create_subplan: %s\n" % e)

Parameters

NameTypeDescriptionNotes
sub_plan_createSubPlanCreate

Return type

SubPlan

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]

delete_subplan

object delete_subplan(subplan_id)

Delete Subplan

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.SubPlansApi(api_client)
    subplan_id = 'subplan_id_example' # str | 

    try:
        # Delete Subplan
        api_response = api_instance.delete_subplan(subplan_id)
        print("The response of SubPlansApi->delete_subplan:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubPlansApi->delete_subplan: %s\n" % e)

Parameters

NameTypeDescriptionNotes
subplan_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]

execute_subplan

SubPlan execute_subplan(subplan_id, sub_plan_execution_options)

Execute Subplan

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.sub_plan import SubPlan
from syntheticusers.models.sub_plan_execution_options import SubPlanExecutionOptions
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.SubPlansApi(api_client)
    subplan_id = 'subplan_id_example' # str | 
    sub_plan_execution_options = syntheticusers.SubPlanExecutionOptions() # SubPlanExecutionOptions | 

    try:
        # Execute Subplan
        api_response = api_instance.execute_subplan(subplan_id, sub_plan_execution_options)
        print("The response of SubPlansApi->execute_subplan:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubPlansApi->execute_subplan: %s\n" % e)

Parameters

NameTypeDescriptionNotes
subplan_idstr
sub_plan_execution_optionsSubPlanExecutionOptions

Return type

SubPlan

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]

extend_subplan

Suggestion extend_subplan(subplan_id)

Extend Subplan

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.suggestion import Suggestion
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.SubPlansApi(api_client)
    subplan_id = 'subplan_id_example' # str | 

    try:
        # Extend Subplan
        api_response = api_instance.extend_subplan(subplan_id)
        print("The response of SubPlansApi->extend_subplan:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubPlansApi->extend_subplan: %s\n" % e)

Parameters

NameTypeDescriptionNotes
subplan_idstr

Return type

Suggestion

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]

generate_subplan_report

SubPlan generate_subplan_report(subplan_id, sub_plan_report)

Generate Subplan Report

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.sub_plan import SubPlan
from syntheticusers.models.sub_plan_report import SubPlanReport
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.SubPlansApi(api_client)
    subplan_id = 'subplan_id_example' # str | 
    sub_plan_report = syntheticusers.SubPlanReport() # SubPlanReport | 

    try:
        # Generate Subplan Report
        api_response = api_instance.generate_subplan_report(subplan_id, sub_plan_report)
        print("The response of SubPlansApi->generate_subplan_report:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubPlansApi->generate_subplan_report: %s\n" % e)

Parameters

NameTypeDescriptionNotes
subplan_idstr
sub_plan_reportSubPlanReport

Return type

SubPlan

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_report_pdf

bytearray get_report_pdf(subplan_id, report_id)

Get Report Pdf

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.SubPlansApi(api_client)
    subplan_id = 'subplan_id_example' # str | 
    report_id = 'report_id_example' # str | 

    try:
        # Get Report Pdf
        api_response = api_instance.get_report_pdf(subplan_id, report_id)
        print("The response of SubPlansApi->get_report_pdf:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubPlansApi->get_report_pdf: %s\n" % e)

Parameters

NameTypeDescriptionNotes
subplan_idstr
report_idstr

Return type

bytearray

Authorization

HTTPBearer

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Returns the PDF report-
404Report not found-
500Error generating report-
422Validation Error-

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

get_subplan

SubPlan get_subplan(subplan_id)

Get Subplan

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.sub_plan import SubPlan
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.SubPlansApi(api_client)
    subplan_id = 'subplan_id_example' # str | 

    try:
        # Get Subplan
        api_response = api_instance.get_subplan(subplan_id)
        print("The response of SubPlansApi->get_subplan:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubPlansApi->get_subplan: %s\n" % e)

Parameters

NameTypeDescriptionNotes
subplan_idstr

Return type

SubPlan

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_subplans

PageSubPlan list_subplans(id=id, project_id=project_id, plan_id=plan_id, page=page, size=size)

List Subplans

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.page_sub_plan import PageSubPlan
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.SubPlansApi(api_client)
    id = 'id_example' # str | Comma-separated list of interviews IDs (optional)
    project_id = 'project_id_example' # str | Comma-separated list of project IDs (optional)
    plan_id = 'plan_id_example' # str | Comma-separated list of plans IDs (optional)
    page = 1 # int | Page number (optional) (default to 1)
    size = 50 # int | Page size (optional) (default to 50)

    try:
        # List Subplans
        api_response = api_instance.list_subplans(id=id, project_id=project_id, plan_id=plan_id, page=page, size=size)
        print("The response of SubPlansApi->list_subplans:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubPlansApi->list_subplans: %s\n" % e)

Parameters

NameTypeDescriptionNotes
idstrComma-separated list of interviews IDs[optional]
project_idstrComma-separated list of project IDs[optional]
plan_idstrComma-separated list of plans IDs[optional]
pageintPage number[optional] [default to 1]
sizeintPage size[optional] [default to 50]

Return type

PageSubPlan

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]

subplan_follow_up

List[Conversation] subplan_follow_up(subplan_id, conversation_create)

Subplan Follow Up

Create follow-up questions for all interviews across all studies in a subplan.

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.conversation import Conversation
from syntheticusers.models.conversation_create import ConversationCreate
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.SubPlansApi(api_client)
    subplan_id = 'subplan_id_example' # str | 
    conversation_create = syntheticusers.ConversationCreate() # ConversationCreate | 

    try:
        # Subplan Follow Up
        api_response = api_instance.subplan_follow_up(subplan_id, conversation_create)
        print("The response of SubPlansApi->subplan_follow_up:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubPlansApi->subplan_follow_up: %s\n" % e)

Parameters

NameTypeDescriptionNotes
subplan_idstr
conversation_createConversationCreate

Return type

List[Conversation]

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]

update_subplan

SubPlan update_subplan(sub_plan_id, sub_plan_update)

Update Subplan

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.sub_plan import SubPlan
from syntheticusers.models.sub_plan_update import SubPlanUpdate
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.SubPlansApi(api_client)
    sub_plan_id = 'sub_plan_id_example' # str | 
    sub_plan_update = syntheticusers.SubPlanUpdate() # SubPlanUpdate | 

    try:
        # Update Subplan
        api_response = api_instance.update_subplan(sub_plan_id, sub_plan_update)
        print("The response of SubPlansApi->update_subplan:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SubPlansApi->update_subplan: %s\n" % e)

Parameters

NameTypeDescriptionNotes
sub_plan_idstr
sub_plan_updateSubPlanUpdate

Return type

SubPlan

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]

Released under the MIT License.