Skip to content

Annotations API

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

MethodHTTP requestDescription
createAnnotationPOST /annotationsCreate Annotation
deleteAnnotationDELETE /annotations/Delete Annotation
getAnnotationGET /annotations/Get Annotation
listAnnotationsGET /annotationsList Annotations
updateAnnotationPATCH /annotations/Update Annotation

createAnnotation

Annotation createAnnotation(appUtilsAnnotationCreate1)

Example

typescript
import { createConfiguration, AnnotationsApi } from '';
import type { AnnotationsApiCreateAnnotationRequest } from '';

const configuration = createConfiguration();
const apiInstance = new AnnotationsApi(configuration);

const request: AnnotationsApiCreateAnnotationRequest = {
  
  appUtilsAnnotationCreate1: {
    conversationId: "conversationId_example",
    userInterviewId: "userInterviewId_example",
    annotation: "annotation_example",
    startIndex: 1,
    endIndex: 1,
    label: "label_example",
  },
};

const data = await apiInstance.createAnnotation(request);
console.log('API called successfully. Returned data:', data);

Parameters

NameTypeDescriptionNotes
appUtilsAnnotationCreate1AppUtilsAnnotationCreate1

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]

deleteAnnotation

any deleteAnnotation()

Example

typescript
import { createConfiguration, AnnotationsApi } from '';
import type { AnnotationsApiDeleteAnnotationRequest } from '';

const configuration = createConfiguration();
const apiInstance = new AnnotationsApi(configuration);

const request: AnnotationsApiDeleteAnnotationRequest = {
  
  annotationId: "annotation_id_example",
};

const data = await apiInstance.deleteAnnotation(request);
console.log('API called successfully. Returned data:', data);

Parameters

NameTypeDescriptionNotes
annotationId[string]defaults to undefined

Return type

any

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]

getAnnotation

Annotation getAnnotation()

Example

typescript
import { createConfiguration, AnnotationsApi } from '';
import type { AnnotationsApiGetAnnotationRequest } from '';

const configuration = createConfiguration();
const apiInstance = new AnnotationsApi(configuration);

const request: AnnotationsApiGetAnnotationRequest = {
  
  annotationId: "annotation_id_example",
};

const data = await apiInstance.getAnnotation(request);
console.log('API called successfully. Returned data:', data);

Parameters

NameTypeDescriptionNotes
annotationId[string]defaults to undefined

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]

listAnnotations

PageAnnotation listAnnotations()

Example

typescript
import { createConfiguration, AnnotationsApi } from '';
import type { AnnotationsApiListAnnotationsRequest } from '';

const configuration = createConfiguration();
const apiInstance = new AnnotationsApi(configuration);

const request: AnnotationsApiListAnnotationsRequest = {
    // Comma-separated list of studies IDs (optional)
  id: "id_example",
    // Comma-separated list of project IDs (optional)
  projectId: "projectId_example",
    // Comma-separated list of study IDs (optional)
  studyId: "studyId_example",
    // Comma-separated list of userInterview IDs (optional)
  userInterviewId: "userInterviewId_example",
    // Filter by text (optional)
  query: "query_example",
    // Page number (optional)
  page: 1,
    // Page size (optional)
  size: 50,
};

const data = await apiInstance.listAnnotations(request);
console.log('API called successfully. Returned data:', data);

Parameters

NameTypeDescriptionNotes
id[string]Comma-separated list of studies IDs(optional) defaults to undefined
projectId[string]Comma-separated list of project IDs(optional) defaults to undefined
studyId[string]Comma-separated list of study IDs(optional) defaults to undefined
userInterviewId[string]Comma-separated list of userInterview IDs(optional) defaults to undefined
query[string]Filter by text(optional) defaults to undefined
page[number]Page number(optional) defaults to 1
size[number]Page size(optional) defaults 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]

updateAnnotation

Annotation updateAnnotation(appUtilsAnnotationCreate2)

Example

typescript
import { createConfiguration, AnnotationsApi } from '';
import type { AnnotationsApiUpdateAnnotationRequest } from '';

const configuration = createConfiguration();
const apiInstance = new AnnotationsApi(configuration);

const request: AnnotationsApiUpdateAnnotationRequest = {
  
  annotationId: "annotation_id_example",
  
  appUtilsAnnotationCreate2: {
    label: "label_example",
  },
};

const data = await apiInstance.updateAnnotation(request);
console.log('API called successfully. Returned data:', data);

Parameters

NameTypeDescriptionNotes
appUtilsAnnotationCreate2AppUtilsAnnotationCreate2
annotationId[string]defaults to undefined

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.