Skip to main content

Annotations API

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

MethodHTTP requestDescription
annotationsCreateNewAnnotationPOST /annotations/create/annotations/create [POST]
annotationsDeleteSpecificAnnotationPOST /annotations/{annotation}/delete/annotations/{annotation}/delete [POST]
annotationsSnapshotGET /annotations/annotations [GET]

annotationsCreateNewAnnotation

Annotation annotationsCreateNewAnnotation()

This will create an annotation.

Example

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

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

const body: Pieces.AnnotationsCreateNewAnnotationRequest = {
// SeededAnnotation (optional)
seededAnnotation: ,
};

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

Parameters

NameTypeDescriptionNotes
seededAnnotationSeededAnnotation

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-

annotationsDeleteSpecificAnnotation

annotationsDeleteSpecificAnnotation()

this will delete a specific annotation

Example

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

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

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

apiInstance.annotationsDeleteSpecificAnnotation(body).then((data: void (empty response body)) => {
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

void (empty response body)

HTTP request headers

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

HTTP response details

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

annotationsSnapshot

Annotations annotationsSnapshot()

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

Example

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

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

const body: Pieces.AnnotationsSnapshotRequest = {
// 'DESCRIPTION' | 'COMMENT' | 'COMMENTATION' | 'DOCUMENTATION' | 'SUMMARIZATION' | 'SUMMARY' | 'EXPLANATION' | 'GIT_COMMIT' | This is an AnnotationTypeEnum as a optional filter. (optional)
annotationTypeFilter: annotationTypeFilter_example,
};

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

Parameters

NameTypeDescriptionNotes
annotationTypeFilter[**'DESCRIPTION''COMMENT''COMMENTATION'

Return type

Annotations

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-