const data = {
pageNumber: 8,
fileRef: { externalId: 'def_file_changed' },
textRegion: { xMin: 0, xMax: 0.1, yMin: 0, yMax: 0.2 },
};
const changes = [
{
id: 1,
update: {
data: {
set: data,
},
},
},
];
const updatedResp = await client.annotations.update(changes);{
"items": [
{
"id": 4096,
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"annotatedResourceType": "file",
"annotatedResourceId": 1337,
"annotationType": "pointcloud.BoundingVolume",
"creatingApp": "cognite-vision",
"creatingAppVersion": "1.2.1",
"creatingUser": "john.doe@cognite.com",
"data": {
"assetRef": {
"externalId": "abc"
},
"symbolRegion": {
"xMin": 0.1,
"xMax": 0.2,
"yMin": 0.1,
"yMax": 0.2
},
"textRegion": {
"xMin": 0.2,
"xMax": 0.3,
"yMin": 0.2,
"yMax": 0.3
},
"pageNumber": 43
},
"status": "approved"
}
]
}Required capabilities:
annotationsAcl:WRITE
Updates the referenced annotations.
The caller must have read-access on all the annotated resources, otherwise the call will fail.
const data = {
pageNumber: 8,
fileRef: { externalId: 'def_file_changed' },
textRegion: { xMin: 0, xMax: 0.1, yMin: 0, yMax: 0.2 },
};
const changes = [
{
id: 1,
update: {
data: {
set: data,
},
},
},
];
const updatedResp = await client.annotations.update(changes);{
"items": [
{
"id": 4096,
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"annotatedResourceType": "file",
"annotatedResourceId": 1337,
"annotationType": "pointcloud.BoundingVolume",
"creatingApp": "cognite-vision",
"creatingAppVersion": "1.2.1",
"creatingUser": "john.doe@cognite.com",
"data": {
"assetRef": {
"externalId": "abc"
},
"symbolRegion": {
"xMin": 0.1,
"xMax": 0.2,
"yMin": 0.1,
"yMax": 0.2
},
"textRegion": {
"xMin": 0.2,
"xMax": 0.3,
"yMin": 0.2,
"yMax": 0.3
},
"pageNumber": 43
},
"status": "approved"
}
]
}Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
A request for updating existing annotations
Show child attributes
Successful update
A list of annotations
Show child attributes
Was this page helpful?