Updates events in the same project. This operation supports partial updates; Fields omitted from queries will remain unchanged on objects.
For primitive fields (String, Long, Int), use 'set': 'value' to update value; use 'setNull': true to set that field to null.
For the Json Array field (e.g. assetIds), use 'set': [value1, value2] to update value; use 'add': [v1, v2] to add values to current list of values; use 'remove': [v1, v2] to remove these values from current list of values if exists.
A maximum of 1000 events can be updated per request, and all of the event IDs must be unique.
This endpoint is a subject of the new throttling schema (limited request rate and concurrency). Please check Events resource description for more information.
List of changes. A maximum of 1000 events can be updated per request, and all of the event IDs must be unique.
required | Array of EventChangeById (object) or EventChangeByExternalId (object) (EventChange) [ 1 .. 1000 ] items |
Paged response with list of events
The response for a bad request.
The response for too many requests (concurrency or rate throttling).
event = client.events.retrieve(id=1) event.description = "New description" res = client.events.update(event) from cognite.client.data_classes import EventUpdate my_update = EventUpdate(id=1).description.set("New description").metadata.add({"key": "value"}) res = client.events.update(my_update)
{- "items": [
- {
- "externalId": "my.known.id",
- "dataSetId": 1,
- "startTime": 1730204346000,
- "endTime": 1730204346000,
- "type": "string",
- "subtype": "string",
- "description": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "assetIds": [
- 1
], - "source": "string",
- "id": 1,
- "lastUpdatedTime": 1730204346000,
- "createdTime": 1730204346000
}
]
}