Skip to content

Summaries API

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

MethodHTTP requestDescription
export_summaryGET /summaries/{summary_id}/exportExport Summary
get_summaryGET /summaries/Get Summary
list_summariesGET /summariesList Summaries
summary_follow_upPOST /summaries/{summary_id}/follow_upSummary Follow Up

export_summary

object export_summary(summary_id, file_extension=file_extension)

Export Summary

Export a summary with all related inputs and user interviews

Args: summary_id: The ID of the summary file_extension: The extension of the exported file

Returns: FileResponse with the exported file

Raises: HTTPException: If summary not found or error during export

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.SummariesApi(api_client)
    summary_id = 'summary_id_example' # str | 
    file_extension = 'txt' # str | File extension to export (optional) (default to 'txt')

    try:
        # Export Summary
        api_response = api_instance.export_summary(summary_id, file_extension=file_extension)
        print("The response of SummariesApi->export_summary:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SummariesApi->export_summary: %s\n" % e)

Parameters

NameTypeDescriptionNotes
summary_idstr
file_extensionstrFile extension to export[optional] [default to 'txt']

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]

get_summary

Summary get_summary(summary_id)

Get Summary

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.summary import Summary
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.SummariesApi(api_client)
    summary_id = 'summary_id_example' # str | 

    try:
        # Get Summary
        api_response = api_instance.get_summary(summary_id)
        print("The response of SummariesApi->get_summary:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SummariesApi->get_summary: %s\n" % e)

Parameters

NameTypeDescriptionNotes
summary_idstr

Return type

Summary

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_summaries

PageSummary list_summaries(id=id, project_id=project_id, study_id=study_id, status=status, page=page, size=size)

List Summaries

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.page_summary import PageSummary
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.SummariesApi(api_client)
    id = 'id_example' # str | Comma-separated list of studies IDs (optional)
    project_id = 'project_id_example' # str | Comma-separated list of project IDs (optional)
    study_id = 'study_id_example' # str | Comma-separated list of audiences 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 Summaries
        api_response = api_instance.list_summaries(id=id, project_id=project_id, study_id=study_id, status=status, page=page, size=size)
        print("The response of SummariesApi->list_summaries:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SummariesApi->list_summaries: %s\n" % e)

Parameters

NameTypeDescriptionNotes
idstrComma-separated list of studies IDs[optional]
project_idstrComma-separated list of project IDs[optional]
study_idstrComma-separated list of audiences IDs[optional]
statusstrStatus to filter by[optional]
pageintPage number[optional] [default to 1]
sizeintPage size[optional] [default to 50]

Return type

PageSummary

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]

summary_follow_up

SummaryMessage summary_follow_up(summary_id, summary_message_create)

Summary Follow Up

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.summary_message import SummaryMessage
from syntheticusers.models.summary_message_create import SummaryMessageCreate
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.SummariesApi(api_client)
    summary_id = 'summary_id_example' # str | 
    summary_message_create = syntheticusers.SummaryMessageCreate() # SummaryMessageCreate | 

    try:
        # Summary Follow Up
        api_response = api_instance.summary_follow_up(summary_id, summary_message_create)
        print("The response of SummariesApi->summary_follow_up:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SummariesApi->summary_follow_up: %s\n" % e)

Parameters

NameTypeDescriptionNotes
summary_idstr
summary_message_createSummaryMessageCreate

Return type

SummaryMessage

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.