API DocsRESTAnnotation service

CreateAnnotation

Creates an annotation.

POST
/api/v1/annotations

Request Body

application/jsonRequired

The request for a call to AnnotationService_CreateAnnotation to create a new annotation. At least 1 asset, tag, or channel must be specified.

name
Required
string

The name assigned to the new annotation.

descriptionstring

A short description about the new annotation.

startTime
Required
string

When the annotation starts.

Format: "date-time"

endTime
Required
string

When the annotation ends.

Format: "date-time"

assetsarray<string>

The names of the assets to associate with this annotation.

linkedChannelsarray<object>

The channels to associate with this annotation.

tagsarray<string>

The names of the tags to associate with this annotation.

runIdstring

The ID of the run that this annotation is associated with.

assignToUserIdstring

The ID of the user that this annotation is assigned to.

organizationIdstring

The organization associated with this annotation. An organization ID is only required if the user belongs to multiple organizations.

statestring

Default: "ANNOTATION_STATE_UNSPECIFIED"Value in: "ANNOTATION_STATE_UNSPECIFIED" | "ANNOTATION_STATE_OPEN" | "ANNOTATION_STATE_FLAGGED" | "ANNOTATION_STATE_RESOLVED"

annotationTypestring

Default: "ANNOTATION_TYPE_UNSPECIFIED"Value in: "ANNOTATION_TYPE_UNSPECIFIED" | "ANNOTATION_TYPE_DATA_REVIEW" | "ANNOTATION_TYPE_PHASE"

createdByConditionIdstring

The ID of the rule condition that created this annotation.

legendConfigstring

A JSON string containing the axes configuration of the annotation's linked channels.

createdByRuleConditionVersionIdstring

The ID of the rule condition version that created this annotation.

curl -X POST "<API_URL>/api/v1/annotations" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "startTime": "2019-08-24T14:15:22Z",
    "endTime": "2019-08-24T14:15:22Z",
    "assets": [
      "string"
    ],
    "linkedChannels": [
      {
        "channel": {
          "channelId": "string"
        },
        "bitFieldElement": {
          "channelId": "string",
          "bitFieldName": "string"
        }
      }
    ],
    "tags": [
      "string"
    ],
    "runId": "string",
    "assignToUserId": "string",
    "organizationId": "string",
    "state": "ANNOTATION_STATE_UNSPECIFIED",
    "annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
    "createdByConditionId": "string",
    "legendConfig": "string",
    "createdByRuleConditionVersionId": "string"
  }'

A successful response.

{
  "annotation": {
    "annotationId": "string",
    "name": "string",
    "description": "string",
    "startTime": "2019-08-24T14:15:22Z",
    "endTime": "2019-08-24T14:15:22Z",
    "createdByUserId": "string",
    "modifiedByUserId": "string",
    "createdDate": "2019-08-24T14:15:22Z",
    "modifiedDate": "2019-08-24T14:15:22Z",
    "runId": "string",
    "state": "ANNOTATION_STATE_UNSPECIFIED",
    "organizationId": "string",
    "assignedToUserId": "string",
    "annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
    "tags": [
      "string"
    ],
    "legendConfig": "string",
    "createdByConditionId": "string",
    "createdByRuleConditionVersionId": "string",
    "reportRuleVersionId": "string"
  }
}