curl --request PATCH \
--url https://api.siftstack.com/api/v1/annotations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"annotation": {
"annotationId": "<string>",
"name": "<string>",
"description": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
"tags": [
"<string>"
],
"runId": "<string>",
"state": "ANNOTATION_STATE_UNSPECIFIED",
"assignedToUserId": "<string>",
"legendConfig": "<string>",
"createdByConditionId": "<string>",
"createdByRuleConditionVersionId": "<string>",
"reportRuleVersionId": "<string>",
"deletedDate": "2023-11-07T05:31:56Z",
"linkedChannels": [
{}
],
"assetIds": [
"<string>"
],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
]
},
"updateMask": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v1/annotations"
payload = {
"annotation": {
"annotationId": "<string>",
"name": "<string>",
"description": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
"tags": ["<string>"],
"runId": "<string>",
"state": "ANNOTATION_STATE_UNSPECIFIED",
"assignedToUserId": "<string>",
"legendConfig": "<string>",
"createdByConditionId": "<string>",
"createdByRuleConditionVersionId": "<string>",
"reportRuleVersionId": "<string>",
"deletedDate": "2023-11-07T05:31:56Z",
"linkedChannels": [{}],
"assetIds": ["<string>"],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": True,
"archivedDate": "2023-11-07T05:31:56Z"
}
]
},
"updateMask": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/annotations"
payload := strings.NewReader("{\n \"annotation\": {\n \"annotationId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"createdByUserId\": \"<string>\",\n \"modifiedByUserId\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"modifiedDate\": \"2023-11-07T05:31:56Z\",\n \"organizationId\": \"<string>\",\n \"annotationType\": \"ANNOTATION_TYPE_UNSPECIFIED\",\n \"tags\": [\n \"<string>\"\n ],\n \"runId\": \"<string>\",\n \"state\": \"ANNOTATION_STATE_UNSPECIFIED\",\n \"assignedToUserId\": \"<string>\",\n \"legendConfig\": \"<string>\",\n \"createdByConditionId\": \"<string>\",\n \"createdByRuleConditionVersionId\": \"<string>\",\n \"reportRuleVersionId\": \"<string>\",\n \"deletedDate\": \"2023-11-07T05:31:56Z\",\n \"linkedChannels\": [\n {}\n ],\n \"assetIds\": [\n \"<string>\"\n ],\n \"metadata\": [\n {\n \"key\": {\n \"name\": \"<string>\",\n \"type\": \"METADATA_KEY_TYPE_UNSPECIFIED\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\"\n },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"updateMask\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"annotation": {
"annotationId": "<string>",
"name": "<string>",
"description": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
"tags": [
"<string>"
],
"runId": "<string>",
"state": "ANNOTATION_STATE_UNSPECIFIED",
"assignedToUserId": "<string>",
"legendConfig": "<string>",
"createdByConditionId": "<string>",
"createdByRuleConditionVersionId": "<string>",
"reportRuleVersionId": "<string>",
"pending": true,
"assignedToUser": {
"userId": "<string>",
"userName": "<string>",
"organizations": [
{
"organizationId": "<string>",
"organizationName": "<string>"
}
]
},
"deletedDate": "2023-11-07T05:31:56Z",
"linkedChannels": [
{
"channel": {
"channelId": "<string>"
},
"bitFieldElement": {
"channelId": "<string>",
"bitFieldName": "<string>"
}
}
],
"assetIds": [
"<string>"
],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}UpdateAnnotation
Updates an existing annotation using using the list of fields specified in update_mask.
curl --request PATCH \
--url https://api.siftstack.com/api/v1/annotations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"annotation": {
"annotationId": "<string>",
"name": "<string>",
"description": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
"tags": [
"<string>"
],
"runId": "<string>",
"state": "ANNOTATION_STATE_UNSPECIFIED",
"assignedToUserId": "<string>",
"legendConfig": "<string>",
"createdByConditionId": "<string>",
"createdByRuleConditionVersionId": "<string>",
"reportRuleVersionId": "<string>",
"deletedDate": "2023-11-07T05:31:56Z",
"linkedChannels": [
{}
],
"assetIds": [
"<string>"
],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
]
},
"updateMask": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v1/annotations"
payload = {
"annotation": {
"annotationId": "<string>",
"name": "<string>",
"description": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
"tags": ["<string>"],
"runId": "<string>",
"state": "ANNOTATION_STATE_UNSPECIFIED",
"assignedToUserId": "<string>",
"legendConfig": "<string>",
"createdByConditionId": "<string>",
"createdByRuleConditionVersionId": "<string>",
"reportRuleVersionId": "<string>",
"deletedDate": "2023-11-07T05:31:56Z",
"linkedChannels": [{}],
"assetIds": ["<string>"],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": True,
"archivedDate": "2023-11-07T05:31:56Z"
}
]
},
"updateMask": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/annotations"
payload := strings.NewReader("{\n \"annotation\": {\n \"annotationId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"createdByUserId\": \"<string>\",\n \"modifiedByUserId\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"modifiedDate\": \"2023-11-07T05:31:56Z\",\n \"organizationId\": \"<string>\",\n \"annotationType\": \"ANNOTATION_TYPE_UNSPECIFIED\",\n \"tags\": [\n \"<string>\"\n ],\n \"runId\": \"<string>\",\n \"state\": \"ANNOTATION_STATE_UNSPECIFIED\",\n \"assignedToUserId\": \"<string>\",\n \"legendConfig\": \"<string>\",\n \"createdByConditionId\": \"<string>\",\n \"createdByRuleConditionVersionId\": \"<string>\",\n \"reportRuleVersionId\": \"<string>\",\n \"deletedDate\": \"2023-11-07T05:31:56Z\",\n \"linkedChannels\": [\n {}\n ],\n \"assetIds\": [\n \"<string>\"\n ],\n \"metadata\": [\n {\n \"key\": {\n \"name\": \"<string>\",\n \"type\": \"METADATA_KEY_TYPE_UNSPECIFIED\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\"\n },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"updateMask\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"annotation": {
"annotationId": "<string>",
"name": "<string>",
"description": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
"tags": [
"<string>"
],
"runId": "<string>",
"state": "ANNOTATION_STATE_UNSPECIFIED",
"assignedToUserId": "<string>",
"legendConfig": "<string>",
"createdByConditionId": "<string>",
"createdByRuleConditionVersionId": "<string>",
"reportRuleVersionId": "<string>",
"pending": true,
"assignedToUser": {
"userId": "<string>",
"userName": "<string>",
"organizations": [
{
"organizationId": "<string>",
"organizationName": "<string>"
}
]
},
"deletedDate": "2023-11-07T05:31:56Z",
"linkedChannels": [
{
"channel": {
"channelId": "<string>"
},
"bitFieldElement": {
"channelId": "<string>",
"bitFieldName": "<string>"
}
}
],
"assetIds": [
"<string>"
],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The request for a call to AnnotationService_UpdateAnnotation to update an annotation.
The request for a call to AnnotationService_UpdateAnnotation to update an annotation.
Show child attributes
Show child attributes
The list of fields to be updated. The fields available to be updated are name, description, start_time,
end_time, assigned_to_user_id, state, tags, legend_config, linked_channels, and metadata.
Important Note: if tags is specified in the update mask and annotation.tags is an empty list then all associated tags on the annotation
will be removed.
Response
A successful response.
The response of a call to AnnotationService_UpdateAnnotation.
Show child attributes
Show child attributes
Was this page helpful?