Appearance
Studies API
All URIs are relative to https://api.syntheticusers.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| create_study | POST /studies | Create Study |
| delete_study | DELETE /studies/ | Delete Study |
| edit_study | PATCH /studies/ | Edit Study |
| generate_knowledge_graph | POST /studies/{study_id}/knowledge_graph | Generate Knowledge Graph |
| generate_summary | POST /studies/{study_id}/summary | Generate Summary |
| get_study | GET /studies/ | Get Study |
| get_study_pdf | GET /studies/{study_id}/pdf | Download Study as PDF |
| interview | POST /studies/{study_id}/interview | Interview |
| list_studies | GET /studies | List Studies |
| regenerate_all_interviews | POST /studies/{study_id}/regenerate | Regenerate All Interviews |
| study_follow_up | POST /studies/{study_id}/follow_up | Study Follow Up |
create_study
Study create_study(study_create)
Create Study
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.study import Study
from syntheticusers.models.study_create import StudyCreate
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.StudiesApi(api_client)
study_create = syntheticusers.StudyCreate() # StudyCreate |
try:
# Create Study
api_response = api_instance.create_study(study_create)
print("The response of StudiesApi->create_study:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StudiesApi->create_study: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| study_create | StudyCreate |
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_study
object delete_study(study_id)
Delete Study
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.StudiesApi(api_client)
study_id = 'study_id_example' # str |
try:
# Delete Study
api_response = api_instance.delete_study(study_id)
print("The response of StudiesApi->delete_study:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StudiesApi->delete_study: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| study_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]
edit_study
Study edit_study(study_id, study_update)
Edit Study
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.study import Study
from syntheticusers.models.study_update import StudyUpdate
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.StudiesApi(api_client)
study_id = 'study_id_example' # str |
study_update = syntheticusers.StudyUpdate() # StudyUpdate |
try:
# Edit Study
api_response = api_instance.edit_study(study_id, study_update)
print("The response of StudiesApi->edit_study:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StudiesApi->edit_study: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| study_id | str | ||
| study_update | StudyUpdate |
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]
generate_knowledge_graph
KnowledgeGraph generate_knowledge_graph(study_id)
Generate Knowledge Graph
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.knowledge_graph import KnowledgeGraph
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.StudiesApi(api_client)
study_id = 'study_id_example' # str |
try:
# Generate Knowledge Graph
api_response = api_instance.generate_knowledge_graph(study_id)
print("The response of StudiesApi->generate_knowledge_graph:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StudiesApi->generate_knowledge_graph: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| study_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]
generate_summary
Summary generate_summary(study_id, summary_create)
Generate Summary
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.summary import Summary
from syntheticusers.models.summary_create import SummaryCreate
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.StudiesApi(api_client)
study_id = 'study_id_example' # str |
summary_create = syntheticusers.SummaryCreate() # SummaryCreate |
try:
# Generate Summary
api_response = api_instance.generate_summary(study_id, summary_create)
print("The response of StudiesApi->generate_summary:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StudiesApi->generate_summary: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| study_id | str | ||
| summary_create | SummaryCreate |
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]
get_study
Study get_study(study_id)
Get Study
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.study import Study
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.StudiesApi(api_client)
study_id = 'study_id_example' # str |
try:
# Get Study
api_response = api_instance.get_study(study_id)
print("The response of StudiesApi->get_study:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StudiesApi->get_study: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| study_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]
get_study_pdf
bytearray get_study_pdf(study_id)
Download Study as PDF
Generates and returns a PDF report containing the study details, latest summary, and interview transcripts.
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.StudiesApi(api_client)
study_id = 'study_id_example' # str | The ID of the study to export as PDF.
try:
# Download Study as PDF
api_response = api_instance.get_study_pdf(study_id)
print("The response of StudiesApi->get_study_pdf:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StudiesApi->get_study_pdf: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| study_id | str | The ID of the study to export as PDF. |
Return type
bytearray
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/pdf, application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Returns the PDF export of the study | - |
| 404 | Study not found | - |
| 500 | Error generating PDF | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to SDK]
interview
Study interview(study_id, study_interviews)
Interview
Start interviews for a study.
Two modes:
- Use existing GSUs: Provide 'syntheticUsers' (List[UUID])
- Generate + Interview: Provide 'quantity' only
In Mode 2, audience/problems/research_goal/files are automatically pulled from the study.
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.study import Study
from syntheticusers.models.study_interviews import StudyInterviews
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.StudiesApi(api_client)
study_id = 'study_id_example' # str |
study_interviews = syntheticusers.StudyInterviews() # StudyInterviews |
try:
# Interview
api_response = api_instance.interview(study_id, study_interviews)
print("The response of StudiesApi->interview:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StudiesApi->interview: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| study_id | str | ||
| study_interviews | StudyInterviews |
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]
list_studies
PageStudy list_studies(id=id, project_id=project_id, audience_id=audience_id, status=status, page=page, size=size)
List Studies
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.page_study import PageStudy
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.StudiesApi(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)
audience_id = 'audience_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 Studies
api_response = api_instance.list_studies(id=id, project_id=project_id, audience_id=audience_id, status=status, page=page, size=size)
print("The response of StudiesApi->list_studies:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StudiesApi->list_studies: %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] |
| audience_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]
regenerate_all_interviews
Study regenerate_all_interviews(study_id)
Regenerate All Interviews
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.study import Study
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.StudiesApi(api_client)
study_id = 'study_id_example' # str |
try:
# Regenerate All Interviews
api_response = api_instance.regenerate_all_interviews(study_id)
print("The response of StudiesApi->regenerate_all_interviews:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StudiesApi->regenerate_all_interviews: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| study_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]
study_follow_up
List[Conversation] study_follow_up(study_id, conversation_create)
Study Follow Up
Create follow-up questions for all interviews in a study.
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.StudiesApi(api_client)
study_id = 'study_id_example' # str |
conversation_create = syntheticusers.ConversationCreate() # ConversationCreate |
try:
# Study Follow Up
api_response = api_instance.study_follow_up(study_id, conversation_create)
print("The response of StudiesApi->study_follow_up:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StudiesApi->study_follow_up: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| study_id | str | ||
| conversation_create | ConversationCreate |
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 | - |