Skip to content

Studies API

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

MethodHTTP requestDescription
create_studyPOST /studiesCreate Study
delete_studyDELETE /studies/Delete Study
edit_studyPATCH /studies/Edit Study
generate_knowledge_graphPOST /studies/{study_id}/knowledge_graphGenerate Knowledge Graph
generate_summaryPOST /studies/{study_id}/summaryGenerate Summary
get_studyGET /studies/Get Study
get_study_pdfGET /studies/{study_id}/pdfDownload Study as PDF
interviewPOST /studies/{study_id}/interviewInterview
list_studiesGET /studiesList Studies
regenerate_all_interviewsPOST /studies/{study_id}/regenerateRegenerate All Interviews
study_follow_upPOST /studies/{study_id}/follow_upStudy 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

NameTypeDescriptionNotes
study_createStudyCreate

Return type

Study

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_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

NameTypeDescriptionNotes
study_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_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

NameTypeDescriptionNotes
study_idstr
study_updateStudyUpdate

Return type

Study

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]

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

NameTypeDescriptionNotes
study_idstr

Return type

KnowledgeGraph

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_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

NameTypeDescriptionNotes
study_idstr
summary_createSummaryCreate

Return type

Summary

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_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

NameTypeDescriptionNotes
study_idstr

Return type

Study

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_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

NameTypeDescriptionNotes
study_idstrThe ID of the study to export as PDF.

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 export of the study-
404Study not found-
500Error generating PDF-
422Validation 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:

  1. Use existing GSUs: Provide 'syntheticUsers' (List[UUID])
  2. 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

NameTypeDescriptionNotes
study_idstr
study_interviewsStudyInterviews

Return type

Study

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]

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

NameTypeDescriptionNotes
idstrComma-separated list of studies IDs[optional]
project_idstrComma-separated list of project IDs[optional]
audience_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

PageStudy

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_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

NameTypeDescriptionNotes
study_idstr

Return type

Study

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]

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

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

Released under the MIT License.