Appearance
Annotations API
All URIs are relative to https://api.syntheticusers.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| create_annotation | POST /annotations | Create Annotation |
| delete_annotation | DELETE /annotations/ | Delete Annotation |
| get_annotation | GET /annotations/ | Get Annotation |
| list_annotations | GET /annotations | List Annotations |
| update_annotation | PATCH /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
| Name | Type | Description | Notes |
|---|---|---|---|
| app_utils_annotation_create1 | AppUtilsAnnotationCreate1 |
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_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
| Name | Type | Description | Notes |
|---|---|---|---|
| annotation_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]
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
| Name | Type | Description | Notes |
|---|---|---|---|
| annotation_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_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
| 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 study IDs | [optional] |
| user_interview_id | str | Comma-separated list of userInterview IDs | [optional] |
| query | str | Filter by text | [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]
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
| Name | Type | Description | Notes |
|---|---|---|---|
| annotation_id | str | ||
| app_utils_annotation_create2 | AppUtilsAnnotationCreate2 |
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 | - |