Appearance
Summaries API
All URIs are relative to https://api.syntheticusers.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| export_summary | GET /summaries/{summary_id}/export | Export Summary |
| get_summary | GET /summaries/ | Get Summary |
| list_summaries | GET /summaries | List Summaries |
| summary_follow_up | POST /summaries/{summary_id}/follow_up | Summary 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
| Name | Type | Description | Notes |
|---|---|---|---|
| summary_id | str | ||
| file_extension | str | File extension to export | [optional] [default to 'txt'] |
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_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
| Name | Type | Description | Notes |
|---|---|---|---|
| summary_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_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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Comma-separated list of studies IDs | [optional] |
| project_id | str | Comma-separated list of project IDs | [optional] |
| study_id | str | Comma-separated list of audiences IDs | [optional] |
| status | str | Status to filter by | [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]
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
| Name | Type | Description | Notes |
|---|---|---|---|
| summary_id | str | ||
| summary_message_create | SummaryMessageCreate |
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 | - |