UpdateAnnotation
Updates an existing annotation using using the list of fields specified in `update_mask`.
PATCH
/
api
/v1
/annotations
Request Body
application/json
RequiredThe request for a call to AnnotationService_UpdateAnnotation
to update an annotation.
annotation
Requiredobject
updateMask
Requiredstring
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
, and tags
.
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.
curl -X PATCH "<API_URL>/api/v1/annotations" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"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",
"assignedToUser": {
"userId": "string",
"userName": "string",
"organizations": [
{
"organizationId": "string",
"organizationName": "string"
}
]
},
"deletedDate": "2019-08-24T14:15:22Z"
},
"updateMask": "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",
"assignedToUser": {
"userId": "string",
"userName": "string",
"organizations": [
{
"organizationId": "string",
"organizationName": "string"
}
]
},
"deletedDate": "2019-08-24T14:15:22Z"
}
}