Skip to main content

Annotation API

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

MethodHTTP requestDescription
annotationScoresIncrementPOST /annotation/{annotation}/scores/increment'/annotation/{annotation}/scores/increment' [POST]
annotationSpecificAnnotationSnapshotGET /annotation/{annotation}/annotation/{annotation} [GET]
annotationUpdatePOST /annotation/update/annotation/update [POST]

annotationScoresIncrement

annotationScoresIncrement()

This will take in a SeededScoreIncrement and will increment the material relative to the incoming body.

Example

import * as Pieces from '@pieces.app/pieces-os-client'

const configuration = Pieces.Configuration()
const apiInstance = new Pieces.AnnotationApi(configuration)

const body: Pieces.AnnotationScoresIncrementRequest = {
// string | This is a specific annotation uuid.
annotation: annotation_example,
// SeededScoreIncrement (optional)
seededScoreIncrement: ,
};

apiInstance.annotationScoresIncrement(body).then((data: void (empty response body)) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
seededScoreIncrementSeededScoreIncrement
annotation[string]This is a specific annotation uuid.defaults to undefined

Return type

void (empty response body)

HTTP request headers

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

HTTP response details

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

annotationSpecificAnnotationSnapshot

Annotation annotationSpecificAnnotationSnapshot()

This will get a snapshot of a specific annotation.

Example

import * as Pieces from '@pieces.app/pieces-os-client'

const configuration = Pieces.Configuration()
const apiInstance = new Pieces.AnnotationApi(configuration)

const body: Pieces.AnnotationSpecificAnnotationSnapshotRequest = {
// string | This is a specific annotation uuid.
annotation: annotation_example,
};

apiInstance.annotationSpecificAnnotationSnapshot(body).then((data: Annotation) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
annotation[string]This is a specific annotation uuid.defaults to undefined

Return type

Annotation

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

annotationUpdate

Annotation annotationUpdate()

This will update a specific annotation.

Example

import * as Pieces from '@pieces.app/pieces-os-client'

const configuration = Pieces.Configuration()
const apiInstance = new Pieces.AnnotationApi(configuration)

const body: Pieces.AnnotationUpdateRequest = {
// Annotation (optional)
annotation: ,
};

apiInstance.annotationUpdate(body).then((data: Annotation) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
annotationAnnotation

Return type

Annotation

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-