Skip to content

Annotations API

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

MethodHTTP requestDescription
create_annotationPOST /annotationsCreate Annotation
delete_annotationDELETE /annotations/Delete Annotation
get_annotationGET /annotations/Get Annotation
list_annotationsGET /annotationsList Annotations
update_annotationPATCH /annotations/Update Annotation

create_annotation

Annotation create_annotation(app_utils_annotation_create1)

Create Annotation

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.annotation import Annotation
from syntheticusers.models.app_utils_annotation_create1 import AppUtilsAnnotationCreate1
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.AnnotationsApi(api_client)
    app_utils_annotation_create1 = syntheticusers.AppUtilsAnnotationCreate1() # AppUtilsAnnotationCreate1 | 

    try:
        # Create Annotation
        api_response = api_instance.create_annotation(app_utils_annotation_create1)
        print("The response of AnnotationsApi->create_annotation:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AnnotationsApi->create_annotation: %s\n" % e)

Parameters

NameTypeDescriptionNotes
app_utils_annotation_create1AppUtilsAnnotationCreate1

Return type

Annotation

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_annotation

object delete_annotation(annotation_id)

Delete Annotation

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.AnnotationsApi(api_client)
    annotation_id = 'annotation_id_example' # str | 

    try:
        # Delete Annotation
        api_response = api_instance.delete_annotation(annotation_id)
        print("The response of AnnotationsApi->delete_annotation:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AnnotationsApi->delete_annotation: %s\n" % e)

Parameters

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

get_annotation

Annotation get_annotation(annotation_id)

Get Annotation

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.annotation import Annotation
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.AnnotationsApi(api_client)
    annotation_id = 'annotation_id_example' # str | 

    try:
        # Get Annotation
        api_response = api_instance.get_annotation(annotation_id)
        print("The response of AnnotationsApi->get_annotation:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AnnotationsApi->get_annotation: %s\n" % e)

Parameters

NameTypeDescriptionNotes
annotation_idstr

Return type

Annotation

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_annotations

PageAnnotation list_annotations(id=id, project_id=project_id, study_id=study_id, user_interview_id=user_interview_id, query=query, page=page, size=size)

List Annotations

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.page_annotation import PageAnnotation
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.AnnotationsApi(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 study IDs (optional)
    user_interview_id = 'user_interview_id_example' # str | Comma-separated list of userInterview IDs (optional)
    query = 'query_example' # str | Filter by text (optional)
    page = 1 # int | Page number (optional) (default to 1)
    size = 50 # int | Page size (optional) (default to 50)

    try:
        # List Annotations
        api_response = api_instance.list_annotations(id=id, project_id=project_id, study_id=study_id, user_interview_id=user_interview_id, query=query, page=page, size=size)
        print("The response of AnnotationsApi->list_annotations:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AnnotationsApi->list_annotations: %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 study IDs[optional]
user_interview_idstrComma-separated list of userInterview IDs[optional]
querystrFilter by text[optional]
pageintPage number[optional] [default to 1]
sizeintPage size[optional] [default to 50]

Return type

PageAnnotation

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]

update_annotation

Annotation update_annotation(annotation_id, app_utils_annotation_create2)

Update Annotation

Example

  • Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.annotation import Annotation
from syntheticusers.models.app_utils_annotation_create2 import AppUtilsAnnotationCreate2
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.AnnotationsApi(api_client)
    annotation_id = 'annotation_id_example' # str | 
    app_utils_annotation_create2 = syntheticusers.AppUtilsAnnotationCreate2() # AppUtilsAnnotationCreate2 | 

    try:
        # Update Annotation
        api_response = api_instance.update_annotation(annotation_id, app_utils_annotation_create2)
        print("The response of AnnotationsApi->update_annotation:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AnnotationsApi->update_annotation: %s\n" % e)

Parameters

NameTypeDescriptionNotes
annotation_idstr
app_utils_annotation_create2AppUtilsAnnotationCreate2

Return type

Annotation

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.