Skip to main content

Annotations API

All URIs are relative to http://localhost:1000

MethodHTTP requestDescription
annotations_create_new_annotationPOST /annotations/create/annotations/create [POST]
annotations_delete_specific_annotationPOST /annotations/{annotation}/delete/annotations/{annotation}/delete [POST]
annotations_snapshotGET /annotations/annotations [GET]

annotations_create_new_annotation​

Annotation annotations_create_new_annotation(seeded_annotation=seeded_annotation)

/annotations/create [POST]

This will create an annotation.

Example​

import pieces_os_client
from pieces_os_client.models.annotation import Annotation
from pieces_os_client.models.seeded_annotation import SeededAnnotation
from pieces_os_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:1000
# See configuration.py for a list of all supported configuration parameters.
configuration = pieces_os_client.Configuration(
host="http://localhost:1000"
)


# Enter a context with an instance of the API client
with pieces_os_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pieces_os_client.AnnotationsApi(api_client)
seeded_annotation = pieces_os_client.SeededAnnotation() # SeededAnnotation | (optional)

try:
# /annotations/create [POST]
api_response = api_instance.annotations_create_new_annotation(seeded_annotation=seeded_annotation)
print("The response of AnnotationsApi->annotations_create_new_annotation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AnnotationsApi->annotations_create_new_annotation: %s\n" % e)

Parameters​

NameTypeDescriptionNotes
seeded_annotationSeededAnnotation[optional]

Return type​

Annotation

Authorization​

No authorization required

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json, text/plain

HTTP response details​

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

annotations_delete_specific_annotation​

annotations_delete_specific_annotation(annotation)

/annotations/{annotation}/delete [POST]

this will delete a specific annotation

Example​

import pieces_os_client
from pieces_os_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:1000
# See configuration.py for a list of all supported configuration parameters.
configuration = pieces_os_client.Configuration(
host="http://localhost:1000"
)


# Enter a context with an instance of the API client
with pieces_os_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pieces_os_client.AnnotationsApi(api_client)
annotation = 'annotation_example' # str | This is a specific annotation uuid.

try:
# /annotations/\{annotation\}/delete [POST]
api_instance.annotations_delete_specific_annotation(annotation)
except Exception as e:
print("Exception when calling AnnotationsApi->annotations_delete_specific_annotation: %s\n" % e)

Parameters​

NameTypeDescriptionNotes
annotationstrThis is a specific annotation uuid.

Return type​

void (empty response body)

Authorization​

No authorization required

HTTP request headers​

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details​

Status codeDescriptionResponse headers
204No Content-
500Internal Server Error-

annotations_snapshot​

Annotations annotations_snapshot(annotation_type_filter=annotation_type_filter)

/annotations [GET]

This will get a snapshot of all the annotations. This will take an optional filter as a query param.

Example​

import pieces_os_client
from pieces_os_client.models.annotations import Annotations
from pieces_os_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:1000
# See configuration.py for a list of all supported configuration parameters.
configuration = pieces_os_client.Configuration(
host="http://localhost:1000"
)


# Enter a context with an instance of the API client
with pieces_os_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pieces_os_client.AnnotationsApi(api_client)
annotation_type_filter = 'annotation_type_filter_example' # str | This is an AnnotationTypeEnum as a optional filter. (optional)

try:
# /annotations [GET]
api_response = api_instance.annotations_snapshot(annotation_type_filter=annotation_type_filter)
print("The response of AnnotationsApi->annotations_snapshot:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AnnotationsApi->annotations_snapshot: %s\n" % e)

Parameters​

NameTypeDescriptionNotes
annotation_type_filterstrThis is an AnnotationTypeEnum as a optional filter.[optional]

Return type​

Annotations

Authorization​

No authorization required

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json, text/plain

HTTP response details​

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-