Skip to main content

Update an event

Request

Security
ApiKey(Required scopes: events.update)
Path
idstringrequired

ID of the event

Bodyapplication/jsonrequired
metadataobject(EventMetadataInput)

An object with user-defined string keys and string values; key order is not preserved

startstring, (date-time)

Event start time (inclusive)

endstring, (date-time)

Event end time (inclusive)

propertiesobject(EventUpdatePropertiesInput)

A key-value map from event custom property keys to their values. Unknown keys are ignored. Omitted keys are unchanged. Set a value to null to remove it.

eventTypeIdstring(EventUpdateEventTypeIdInput)

If provided, the event must conform to the event type's schema. An empty string will remove the event type.

Payload
{ "metadata": { "property1": "string", "property2": "string" }, "start": "2019-08-24T14:15:22Z", "end": "2019-08-24T14:15:22Z", "properties": {}, "eventTypeId": "string" }

Responses

The updated event

Bodyapplication/json
idstringrequired

ID of the event

startstring, (date-time)required

Event start time (inclusive)

endstring, (date-time)required

Event end time (inclusive)

deviceobject(DeviceSummary)

ID and name of a device.

metadataobjectrequired

Any metadata associated with the event

createdAtstring, (date-time)required

When the event was created

updatedAtstring, (date-time)required

When the event was last updated

eventTypeIdstring

ID of the event type.

propertiesobject(CustomPropertyValues)

A key-value map of the custom properties associated with this event.

deviceIdstringdeprecated

ID of the device associated with the event.

deprecated: Use device.id instead.

Response
{ "id": "string", "start": "2019-08-24T14:15:22Z", "end": "2019-08-24T14:15:22Z", "deviceId": "string", "device": { "id": "string", "name": "string" }, "metadata": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "eventTypeId": "string", "properties": { "property1": "string", "property2": "string" } }