Skip to content

Flake

The flake module is the device tree: every device of the tenant, the services it exposes, and the current value of every property — served from the backend's cache of the last transmissions. Reads never wake a device. Writes are queued and confirmed by the device; the confirmation arrives as the next OBJECT_UPDATED event, and the property's pending field tracks it in the meantime.

{deviceId} accepts the device id or the IMEI throughout. Property ids are canonical hex strings (0x0800). Human-readable names, units and enums for these raw values come from the schema module; connectivity and user-defined labels from meta; live updates arrive over the websocket.

New to the API? The Application Developer Guide walks through the whole flow.

GETList devices/api/v1/devices
GETList services of a device/api/v1/devices/:deviceId/services
GETRead all properties of a service/api/v1/devices/:deviceId/services/:serviceId/properties
GETRead one property/api/v1/devices/:deviceId/services/:serviceId/properties/:propertyId
PUTWrite one property/api/v1/devices/:deviceId/services/:serviceId/properties/:propertyId
PUTWrite several properties/api/v1/devices/:deviceId/services/:serviceId/properties
POSTOpen a property stream/api/v1/devices/:deviceId/services/:serviceId/properties/:propertyId/stream
DELETEClose a property stream/api/v1/devices/:deviceId/services/:serviceId/properties/:propertyId/stream
GETRead a property stream/api/v1/devices/:deviceId/services/:serviceId/properties/:propertyId/stream
POSTCall a device method/api/v1/devices/:deviceId/services/:serviceId/messages/:name

List devices

Lists every device the caller may read. depth adds services (1) and their current property values (2) — one call for a dashboard's whole startup state.

GET/api/v1/devices?depth=0

Query Parameters

NameDescription
depthintegeroptionalHow many levels of nested resources the response includes; 0 returns only the top level.
Default: 0
min 0
instancestringoptionalSubstring filter on service ids.
expandstringoptionalComma-separated optional per-property fields to include: propertyType, modifier, transmittedAt, streamData.
Accepted values: modifier, propertyType, transmittedAt, streamData

Response

NameDescription
crnstringUnique Coldwave resource name (CRN) that identifies a resource
imeistringThe device's IMEI, the 15-digit identity of its modem.
servicesarrayoptionaldepth ≥ 1The services in play: in a device listing the device's own services, added from depth 1; in a history query the service identifiers the read is narrowed to.
serviceIdstringService identifier (UUID) of the service on this device.
propertiesarrayoptionaldepth ≥ 2Current values of the service's properties, added at depth 2 — the device listing sits one level further out than a service listing does.
idstringProperty id in canonical hexadecimal form, e.g. 0x0800.
valueThe value as last transmitted. Encoding follows the property type: INT64/UINT64 as decimal strings, BIN/UUID as base64.
measuredAtintegeroptionalWhen the device measured the value, UTC epoch milliseconds; null when the device sent no timestamp.
pendingobjectoptionalSet while a write to this property is still awaiting device confirmation; null otherwise.
valueThe queued value awaiting delivery to the device.
retriesintegerDelivery attempts remaining for the queued write.
min 0
failuresarraystringReasons of the delivery attempts that failed so far.
streamIdstringoptionalId minted by the write request; stream writes report their STREAM_WRITE_* progress under it.
modifierobjectoptionalexpand ∋ modifierFlags the device transmitted with the property.
isReadOnlybooleanThe device declared the property read-only.
isActionablebooleanWriting triggers an action on the device rather than storing a value.
isVolatilebooleanNot cacheable on the wire — reads are forwarded to the device, so a stored value is only as fresh as the last transmission.
isErrorbooleanThe device reported the property in an error state.
isMetabooleanA protocol-level property of the device (such as the transmission timestamp), not application data.
isNullbooleanThe property currently carries no value; value is null.
propertyTypeoptionalenumexpand ∋ propertyTypeWire type of the property (UINT16, FLOAT, STRING, …).
Possible values: INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8, FLOAT, FLOAT64, DATETIME, STRING, BOOL, UUID, BIN, BIN_STREAM, STRING_STREAM, INT64_ARRAY, INT32_ARRAY, INT16_ARRAY, INT8_ARRAY, UINT64_ARRAY, UINT32_ARRAY, UINT16_ARRAY, UINT8_ARRAY, BOOL_ARRAY, UUID_ARRAY, FLOAT64_ARRAY, FLOAT_ARRAY, DATETIME_ARRAY, BIN_ARRAY, STRING_ARRAY
transmittedAtintegeroptionalexpand ∋ transmittedAtWhen the value reached the backend, UTC epoch milliseconds.
streamobjectoptionalPresent on stream properties that have been loaded at least once: a summary of the last loaded payload.
loadedAtintegerWhen the content was loaded from the device, UTC epoch milliseconds.
sizeintegerSize of the loaded content in bytes.
min 0
completebooleanWhether the stream was read to its end.
truncatedbooleanWhether the cached content was cut off at the size limit.
encodingenumHow streamData is encoded: base64 for binary streams, utf8 for string streams.
Possible values: base64, utf8
streamDatastringoptionalexpand ∋ streamDataThe loaded stream content; requested via expand=streamData.

Errors

StatusDescriptionBody
403You do not have permission to perform this action
400The request did not match the schema for this endpoint. The details field carries the specific failures.error: Validation Error
401No valid access token was presented, or the DPoP proof accompanying it was missing, expired or bound to a different key.error: string
500The request failed for a reason that is not the caller's to fix. Safe to retry.error: string, message: string, statusCode: 50

List services of a device

Lists the services of one device; depth=1 adds current property values. {deviceId} accepts the device id or the IMEI.

GET/api/v1/devices/Yk3pL7rWq2/services?depth=0

Path Parameters

NameDescription
deviceIdThe device id, or its IMEI.
Alternative 1stringResource id: Base58 (9–10 characters) or a 16-character Crockford snowflake. Not an RFC 4122 UUID.
Pattern: ^[0-9A-HJ-NP-Za-km-z]{9,16}$
Alternative 2stringThe device id, or its IMEI.
max length 16
Pattern: ^[0-9a-fA-F]+$

Query Parameters

NameDescription
depthintegeroptionalHow many levels of nested resources the response includes; 0 returns only the top level.
Default: 0
min 0
instancestringoptionalSubstring filter on service ids.
expandstringoptionalComma-separated optional per-property fields to include: propertyType, modifier, transmittedAt, streamData.
Accepted values: modifier, propertyType, transmittedAt, streamData

Response

NameDescription
serviceIdstringService identifier (UUID) of the service on this device.
propertiesarrayoptionaldepth ≥ 1The properties in play: in a service listing their current values, added from depth 1; in a history query the ids to read — at least one, because every property is stored as its own series.
idstringProperty id in canonical hexadecimal form, e.g. 0x0800.
valueThe value as last transmitted. Encoding follows the property type: INT64/UINT64 as decimal strings, BIN/UUID as base64.
measuredAtintegeroptionalWhen the device measured the value, UTC epoch milliseconds; null when the device sent no timestamp.
pendingobjectoptionalSet while a write to this property is still awaiting device confirmation; null otherwise.
valueThe queued value awaiting delivery to the device.
retriesintegerDelivery attempts remaining for the queued write.
min 0
failuresarraystringReasons of the delivery attempts that failed so far.
streamIdstringoptionalId minted by the write request; stream writes report their STREAM_WRITE_* progress under it.
modifierobjectoptionalexpand ∋ modifierFlags the device transmitted with the property.
isReadOnlybooleanThe device declared the property read-only.
isActionablebooleanWriting triggers an action on the device rather than storing a value.
isVolatilebooleanNot cacheable on the wire — reads are forwarded to the device, so a stored value is only as fresh as the last transmission.
isErrorbooleanThe device reported the property in an error state.
isMetabooleanA protocol-level property of the device (such as the transmission timestamp), not application data.
isNullbooleanThe property currently carries no value; value is null.
propertyTypeoptionalenumexpand ∋ propertyTypeWire type of the property (UINT16, FLOAT, STRING, …).
Possible values: INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8, FLOAT, FLOAT64, DATETIME, STRING, BOOL, UUID, BIN, BIN_STREAM, STRING_STREAM, INT64_ARRAY, INT32_ARRAY, INT16_ARRAY, INT8_ARRAY, UINT64_ARRAY, UINT32_ARRAY, UINT16_ARRAY, UINT8_ARRAY, BOOL_ARRAY, UUID_ARRAY, FLOAT64_ARRAY, FLOAT_ARRAY, DATETIME_ARRAY, BIN_ARRAY, STRING_ARRAY
transmittedAtintegeroptionalexpand ∋ transmittedAtWhen the value reached the backend, UTC epoch milliseconds.
streamobjectoptionalPresent on stream properties that have been loaded at least once: a summary of the last loaded payload.
loadedAtintegerWhen the content was loaded from the device, UTC epoch milliseconds.
sizeintegerSize of the loaded content in bytes.
min 0
completebooleanWhether the stream was read to its end.
truncatedbooleanWhether the cached content was cut off at the size limit.
encodingenumHow streamData is encoded: base64 for binary streams, utf8 for string streams.
Possible values: base64, utf8
streamDatastringoptionalexpand ∋ streamDataThe loaded stream content; requested via expand=streamData.

Errors

StatusDescriptionBody
403You do not have permission to perform this action
400The request did not match the schema for this endpoint. The details field carries the specific failures.error: Validation Error
401No valid access token was presented, or the DPoP proof accompanying it was missing, expired or bound to a different key.error: string
500The request failed for a reason that is not the caller's to fix. Safe to retry.error: string, message: string, statusCode: 50

Read all properties of a service

Current values of every property of the service, served from the backend's cache of the last transmissions.

GET/api/v1/devices/Yk3pL7rWq2/services/string/properties

Path Parameters

NameDescription
deviceIdThe device id, or its IMEI.
Alternative 1stringResource id: Base58 (9–10 characters) or a 16-character Crockford snowflake. Not an RFC 4122 UUID.
Pattern: ^[0-9A-HJ-NP-Za-km-z]{9,16}$
Alternative 2stringThe device id, or its IMEI.
max length 16
Pattern: ^[0-9a-fA-F]+$
serviceIdstringService identifier (UUID) of the service on this device.
min length 1

Query Parameters

NameDescription
expandstringoptionalComma-separated optional per-property fields to include: propertyType, modifier, transmittedAt, streamData.
Accepted values: modifier, propertyType, transmittedAt, streamData

Response

NameDescription
idstringProperty id in canonical hexadecimal form, e.g. 0x0800.
valueThe value as last transmitted. Encoding follows the property type: INT64/UINT64 as decimal strings, BIN/UUID as base64.
measuredAtintegeroptionalWhen the device measured the value, UTC epoch milliseconds; null when the device sent no timestamp.
pendingobjectoptionalSet while a write to this property is still awaiting device confirmation; null otherwise.
valueThe queued value awaiting delivery to the device.
retriesintegerDelivery attempts remaining for the queued write.
min 0
failuresarraystringReasons of the delivery attempts that failed so far.
streamIdstringoptionalId minted by the write request; stream writes report their STREAM_WRITE_* progress under it.
modifierobjectoptionalexpand ∋ modifierFlags the device transmitted with the property.
isReadOnlybooleanThe device declared the property read-only.
isActionablebooleanWriting triggers an action on the device rather than storing a value.
isVolatilebooleanNot cacheable on the wire — reads are forwarded to the device, so a stored value is only as fresh as the last transmission.
isErrorbooleanThe device reported the property in an error state.
isMetabooleanA protocol-level property of the device (such as the transmission timestamp), not application data.
isNullbooleanThe property currently carries no value; value is null.
propertyTypeoptionalenumexpand ∋ propertyTypeWire type of the property (UINT16, FLOAT, STRING, …).
Possible values: INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8, FLOAT, FLOAT64, DATETIME, STRING, BOOL, UUID, BIN, BIN_STREAM, STRING_STREAM, INT64_ARRAY, INT32_ARRAY, INT16_ARRAY, INT8_ARRAY, UINT64_ARRAY, UINT32_ARRAY, UINT16_ARRAY, UINT8_ARRAY, BOOL_ARRAY, UUID_ARRAY, FLOAT64_ARRAY, FLOAT_ARRAY, DATETIME_ARRAY, BIN_ARRAY, STRING_ARRAY
transmittedAtintegeroptionalexpand ∋ transmittedAtWhen the value reached the backend, UTC epoch milliseconds.
streamobjectoptionalPresent on stream properties that have been loaded at least once: a summary of the last loaded payload.
loadedAtintegerWhen the content was loaded from the device, UTC epoch milliseconds.
sizeintegerSize of the loaded content in bytes.
min 0
completebooleanWhether the stream was read to its end.
truncatedbooleanWhether the cached content was cut off at the size limit.
encodingenumHow streamData is encoded: base64 for binary streams, utf8 for string streams.
Possible values: base64, utf8
streamDatastringoptionalexpand ∋ streamDataThe loaded stream content; requested via expand=streamData.

Errors

StatusDescriptionBody
403You do not have permission to perform this action
404The device, service or property does not exist in this tenant.code: FLAKE_NOT_FOUND
400The request did not match the schema for this endpoint. The details field carries the specific failures.error: Validation Error
401No valid access token was presented, or the DPoP proof accompanying it was missing, expired or bound to a different key.error: string
500The request failed for a reason that is not the caller's to fix. Safe to retry.error: string, message: string, statusCode: 50

Read one property

Current value of a single property, addressed by its hexadecimal id.

GET/api/v1/devices/Yk3pL7rWq2/services/string/properties/string

Path Parameters

NameDescription
deviceIdThe device id, or its IMEI.
Alternative 1stringResource id: Base58 (9–10 characters) or a 16-character Crockford snowflake. Not an RFC 4122 UUID.
Pattern: ^[0-9A-HJ-NP-Za-km-z]{9,16}$
Alternative 2stringThe device id, or its IMEI.
max length 16
Pattern: ^[0-9a-fA-F]+$
serviceIdstringService identifier (UUID) of the service on this device.
min length 1
propertyIdstringProperty id in canonical hexadecimal form, e.g. 0x0800.
Pattern: ^0x[0-9A-Fa-f]+$

Query Parameters

NameDescription
expandstringoptionalComma-separated optional per-property fields to include: propertyType, modifier, transmittedAt, streamData.
Accepted values: modifier, propertyType, transmittedAt, streamData

Response

NameDescription
idstringProperty id in canonical hexadecimal form, e.g. 0x0800.
valueThe value as last transmitted. Encoding follows the property type: INT64/UINT64 as decimal strings, BIN/UUID as base64.
measuredAtintegeroptionalWhen the device measured the value, UTC epoch milliseconds; null when the device sent no timestamp.
pendingobjectoptionalSet while a write to this property is still awaiting device confirmation; null otherwise.
valueThe queued value awaiting delivery to the device.
retriesintegerDelivery attempts remaining for the queued write.
min 0
failuresarraystringReasons of the delivery attempts that failed so far.
streamIdstringoptionalId minted by the write request; stream writes report their STREAM_WRITE_* progress under it.
modifierobjectoptionalexpand ∋ modifierFlags the device transmitted with the property.
isReadOnlybooleanThe device declared the property read-only.
isActionablebooleanWriting triggers an action on the device rather than storing a value.
isVolatilebooleanNot cacheable on the wire — reads are forwarded to the device, so a stored value is only as fresh as the last transmission.
isErrorbooleanThe device reported the property in an error state.
isMetabooleanA protocol-level property of the device (such as the transmission timestamp), not application data.
isNullbooleanThe property currently carries no value; value is null.
propertyTypeoptionalenumexpand ∋ propertyTypeWire type of the property (UINT16, FLOAT, STRING, …).
Possible values: INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8, FLOAT, FLOAT64, DATETIME, STRING, BOOL, UUID, BIN, BIN_STREAM, STRING_STREAM, INT64_ARRAY, INT32_ARRAY, INT16_ARRAY, INT8_ARRAY, UINT64_ARRAY, UINT32_ARRAY, UINT16_ARRAY, UINT8_ARRAY, BOOL_ARRAY, UUID_ARRAY, FLOAT64_ARRAY, FLOAT_ARRAY, DATETIME_ARRAY, BIN_ARRAY, STRING_ARRAY
transmittedAtintegeroptionalexpand ∋ transmittedAtWhen the value reached the backend, UTC epoch milliseconds.
streamobjectoptionalPresent on stream properties that have been loaded at least once: a summary of the last loaded payload.
loadedAtintegerWhen the content was loaded from the device, UTC epoch milliseconds.
sizeintegerSize of the loaded content in bytes.
min 0
completebooleanWhether the stream was read to its end.
truncatedbooleanWhether the cached content was cut off at the size limit.
encodingenumHow streamData is encoded: base64 for binary streams, utf8 for string streams.
Possible values: base64, utf8
streamDatastringoptionalexpand ∋ streamDataThe loaded stream content; requested via expand=streamData.

Errors

StatusDescriptionBody
403You do not have permission to perform this action
404The device, service or property does not exist in this tenant.code: FLAKE_NOT_FOUND
400The request did not match the schema for this endpoint. The details field carries the specific failures.error: Validation Error
401No valid access token was presented, or the DPoP proof accompanying it was missing, expired or bound to a different key.error: string
500The request failed for a reason that is not the caller's to fix. Safe to retry.error: string, message: string, statusCode: 50

Write one property

Queues the value for delivery to the device. The property's pending field tracks confirmation, which arrives as the next OBJECT_UPDATED event; immediate=true fails instead of queueing while the device is offline.

PUT/api/v1/devices/Yk3pL7rWq2/services/string/properties/string?immediate=false&retries=3

Path Parameters

NameDescription
deviceIdThe device id, or its IMEI.
Alternative 1stringResource id: Base58 (9–10 characters) or a 16-character Crockford snowflake. Not an RFC 4122 UUID.
Pattern: ^[0-9A-HJ-NP-Za-km-z]{9,16}$
Alternative 2stringThe device id, or its IMEI.
max length 16
Pattern: ^[0-9a-fA-F]+$
serviceIdstringService identifier (UUID) of the service on this device.
min length 1
propertyIdstringProperty id in canonical hexadecimal form, e.g. 0x0800.
Pattern: ^0x[0-9A-Fa-f]+$

Query Parameters

NameDescription
immediatebooleanoptionalDeliver now or fail: when the device is offline the write is rejected instead of queued.
Default: false
retriesintegeroptionalHow many delivery attempts the backend makes for the queued write (default 3).
Default: 3
min 0

Body

NameDescription
valueThe value as last transmitted. Encoding follows the property type: INT64/UINT64 as decimal strings, BIN/UUID as base64.

Response

NameDescription
streamIdstringCorrelates the write with the STREAM_WRITE_* actions it emits if the property turns out to be a stream; meaningless for scalar writes.

Errors

StatusDescriptionBody
403You do not have permission to perform this action
409The device is offline and the request required immediate delivery — an immediate=true write, a stream operation, or a method call.code: FLAKE_DEVICE_OFFLINE
400The request did not match the schema for this endpoint. The details field carries the specific failures.error: Validation Error
401No valid access token was presented, or the DPoP proof accompanying it was missing, expired or bound to a different key.error: string
500The request failed for a reason that is not the caller's to fix. Safe to retry.error: string, message: string, statusCode: 50

Write several properties

Queues values for several properties of one service in a single request.

PUT/api/v1/devices/Yk3pL7rWq2/services/string/properties?immediate=false&retries=3

Path Parameters

NameDescription
deviceIdThe device id, or its IMEI.
Alternative 1stringResource id: Base58 (9–10 characters) or a 16-character Crockford snowflake. Not an RFC 4122 UUID.
Pattern: ^[0-9A-HJ-NP-Za-km-z]{9,16}$
Alternative 2stringThe device id, or its IMEI.
max length 16
Pattern: ^[0-9a-fA-F]+$
serviceIdstringService identifier (UUID) of the service on this device.
min length 1

Query Parameters

NameDescription
immediatebooleanoptionalDeliver now or fail: when the device is offline the write is rejected instead of queued.
Default: false
retriesintegeroptionalHow many delivery attempts the backend makes for the queued write (default 3).
Default: 3
min 0

Body

NameDescription
idstringProperty id in canonical hexadecimal form, e.g. 0x0800.
Pattern: ^0x[0-9A-Fa-f]+$
valueThe value as last transmitted. Encoding follows the property type: INT64/UINT64 as decimal strings, BIN/UUID as base64.

Response

NameDescription
streamIdstringCorrelates the write with the STREAM_WRITE_* actions it emits if the property turns out to be a stream; meaningless for scalar writes.

Errors

StatusDescriptionBody
403You do not have permission to perform this action
409The device is offline and the request required immediate delivery — an immediate=true write, a stream operation, or a method call.code: FLAKE_DEVICE_OFFLINE
400The request did not match the schema for this endpoint. The details field carries the specific failures.error: Validation Error
401No valid access token was presented, or the DPoP proof accompanying it was missing, expired or bound to a different key.error: string
500The request failed for a reason that is not the caller's to fix. Safe to retry.error: string, message: string, statusCode: 50

Open a property stream

Loads a stream property's content from the device (mode=load) or follows it live (mode=live). Re-opening a running stream refreshes its expiry rather than starting a second one.

POST/api/v1/devices/Yk3pL7rWq2/services/string/properties/string/stream?mode=load&expiresIn=60000

Path Parameters

NameDescription
deviceIdThe device id, or its IMEI.
Alternative 1stringResource id: Base58 (9–10 characters) or a 16-character Crockford snowflake. Not an RFC 4122 UUID.
Pattern: ^[0-9A-HJ-NP-Za-km-z]{9,16}$
Alternative 2stringThe device id, or its IMEI.
max length 16
Pattern: ^[0-9a-fA-F]+$
serviceIdstringService identifier (UUID) of the service on this device.
min length 1
propertyIdstringProperty id in canonical hexadecimal form, e.g. 0x0800.
Pattern: ^0x[0-9A-Fa-f]+$

Query Parameters

NameDescription
modeoptionalenumload pulls the stream until EOF and caches it so it stays readable while the device is offline; live only forwards chunks and stores nothing.
Default: load
Possible values: load, live
expiresInintegeroptionalTime until expiry, in seconds
Default: 60000
> 0

Errors

StatusDescriptionBody
403You do not have permission to perform this action
409The device is offline and the request required immediate delivery — an immediate=true write, a stream operation, or a method call.code: FLAKE_DEVICE_OFFLINE
400The request did not match the schema for this endpoint. The details field carries the specific failures.error: Validation Error
401No valid access token was presented, or the DPoP proof accompanying it was missing, expired or bound to a different key.error: string
500The request failed for a reason that is not the caller's to fix. Safe to retry.error: string, message: string, statusCode: 50

Close a property stream

Closes a running stream on the device.

DELETE/api/v1/devices/Yk3pL7rWq2/services/string/properties/string/stream

Path Parameters

NameDescription
deviceIdThe device id, or its IMEI.
Alternative 1stringResource id: Base58 (9–10 characters) or a 16-character Crockford snowflake. Not an RFC 4122 UUID.
Pattern: ^[0-9A-HJ-NP-Za-km-z]{9,16}$
Alternative 2stringThe device id, or its IMEI.
max length 16
Pattern: ^[0-9a-fA-F]+$
serviceIdstringService identifier (UUID) of the service on this device.
min length 1
propertyIdstringProperty id in canonical hexadecimal form, e.g. 0x0800.
Pattern: ^0x[0-9A-Fa-f]+$

Errors

StatusDescriptionBody
403You do not have permission to perform this action
400The request did not match the schema for this endpoint. The details field carries the specific failures.error: Validation Error
401No valid access token was presented, or the DPoP proof accompanying it was missing, expired or bound to a different key.error: string
500The request failed for a reason that is not the caller's to fix. Safe to retry.error: string, message: string, statusCode: 50

Read a property stream

Returns the loaded stream content and its summary.

GET/api/v1/devices/Yk3pL7rWq2/services/string/properties/string/stream

Path Parameters

NameDescription
deviceIdThe device id, or its IMEI.
Alternative 1stringResource id: Base58 (9–10 characters) or a 16-character Crockford snowflake. Not an RFC 4122 UUID.
Pattern: ^[0-9A-HJ-NP-Za-km-z]{9,16}$
Alternative 2stringThe device id, or its IMEI.
max length 16
Pattern: ^[0-9a-fA-F]+$
serviceIdstringService identifier (UUID) of the service on this device.
min length 1
propertyIdstringProperty id in canonical hexadecimal form, e.g. 0x0800.
Pattern: ^0x[0-9A-Fa-f]+$

Response

NameDescription
loadedAtintegerWhen the content was loaded from the device, UTC epoch milliseconds.
sizeintegerSize of the loaded content in bytes.
min 0
completebooleanWhether the stream was read to its end.
truncatedbooleanWhether the cached content was cut off at the size limit.
encodingenumHow streamData is encoded: base64 for binary streams, utf8 for string streams.
Possible values: base64, utf8
idstringProperty id in canonical hexadecimal form, e.g. 0x0800.
datastringEither a device's user-defined metadata object — null when none was written — or stream content, as a string in the encoding encoding names.

Errors

StatusDescriptionBody
403You do not have permission to perform this action
404The device, service or property does not exist in this tenant.code: FLAKE_NOT_FOUND
400The request did not match the schema for this endpoint. The details field carries the specific failures.error: Validation Error
401No valid access token was presented, or the DPoP proof accompanying it was missing, expired or bound to a different key.error: string
500The request failed for a reason that is not the caller's to fix. Safe to retry.error: string, message: string, statusCode: 50

Call a device method

Invokes a schema-defined method by name and waits for the device's answer — the device must be online; there is no queueing. Parameters state their own id, type and value.

POST/api/v1/devices/Yk3pL7rWq2/services/string/messages/string

Path Parameters

NameDescription
deviceIdThe device id, or its IMEI.
Alternative 1stringResource id: Base58 (9–10 characters) or a 16-character Crockford snowflake. Not an RFC 4122 UUID.
Pattern: ^[0-9A-HJ-NP-Za-km-z]{9,16}$
Alternative 2stringThe device id, or its IMEI.
max length 16
Pattern: ^[0-9a-fA-F]+$
serviceIdstringService identifier (UUID) of the service on this device.
min length 1
namestringName of the addressed item — a block or template, a device method, a recorded event. A method name is limited to letters, digits, _ and -, because it becomes a segment of the message CRN.
Pattern: ^[A-Za-z0-9_-]{1,64}$

Body

NameDescription
paramsarrayoptionalParameters of the call: a device method takes one entry per parameter, each stating its own type; a mail template takes its parameter values keyed by name.
Default: []
idstringProperty id of the parameter, hexadecimal (0x0800).
Pattern: ^0x[0-9A-Fa-f]+$
typeenumWire type of the parameter — stated by the caller, since method parameters have no object-table entry on the device to read it from.
Possible values: INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8, FLOAT, FLOAT64, DATETIME, STRING, BOOL, UUID, BIN, BIN_STREAM, STRING_STREAM, INT64_ARRAY, INT32_ARRAY, INT16_ARRAY, INT8_ARRAY, UINT64_ARRAY, UINT32_ARRAY, UINT16_ARRAY, UINT8_ARRAY, BOOL_ARRAY, UUID_ARRAY, FLOAT64_ARRAY, FLOAT_ARRAY, DATETIME_ARRAY, BIN_ARRAY, STRING_ARRAY
valueParameter value; INT64/UINT64 as decimal strings, BIN/UUID as base64.

Response

NameDescription

Errors

StatusDescriptionBody
403You do not have permission to perform this action
400A method parameter cannot be serialized for the wire — wrong JSON type for the declared property type. id names the parameter, reason says what is wrong.code: FLAKE_INVALID_PARAM, id: string, reason: string
409The device is offline and the request required immediate delivery — an immediate=true write, a stream operation, or a method call.code: FLAKE_DEVICE_OFFLINE
502The instance holding the device connection could not complete the call; reason is what it reported.code: FLAKE_CALL_FAILED, reason: string
504The device did not answer in time — it disconnected mid-call, or the answer is still in flight.code: FLAKE_CALL_TIMEOUT
401No valid access token was presented, or the DPoP proof accompanying it was missing, expired or bound to a different key.error: string
500The request failed for a reason that is not the caller's to fix. Safe to retry.error: string, message: string, statusCode: 50

Events

Published on the tenant's event stream and delivered over the websocket to every subscriber holding read on the resource the message names. resourceIdentifier is the resource the action changed; the payload is the shape below.

EventDescription
CUSTOM_MESSAGE_REQUESTA schema-defined method call was dispatched to the device.
CUSTOM_MESSAGE_RESULTThe device answered a method call; carries the outcome.
OBJECT_UPDATE_REQUESTA write toward a device was requested over the API — the echo of a PUT, carrying the requested updates, the retry budget and the immediate flag.
OBJECT_UPDATEDA device transmitted property values. updates carries one entry per property with per-property timestamps; history holds older samples overwritten in the same transmission.
STREAM_CHUNKA chunk of stream content arrived from the device.
STREAM_CLOSE_REQUESTA client asked to close a running stream.
STREAM_CLOSEDA stream ended: completed, expired, closed, failed, or the device disconnected.
STREAM_OPEN_REQUESTA client asked to load or follow a stream property.
STREAM_WRITE_CLOSEDA stream write toward the device ended — completed or failed.
STREAM_WRITE_PROGRESSA running stream write reported progress.
STREAM_WRITE_STARTEDA stream write toward the device began; correlated to its PUT via streamId.

Method call sent

A schema-defined method call was dispatched to the device.

EVENTCUSTOM_MESSAGE_REQUEST

Payload

NameDescription
requestIdstringTies a method call to its answer across instances: whichever instance holds the device connection runs the call, and the one still holding the HTTP request matches the result by this id. Every other instance drops both.
namestringName of the addressed item — a block or template, a device method, a recorded event. A method name is limited to letters, digits, _ and -, because it becomes a segment of the message CRN.
paramsarrayParameters of the call: a device method takes one entry per parameter, each stating its own type; a mail template takes its parameter values keyed by name.
idstringProperty id of the parameter, hexadecimal (0x0800).
Pattern: ^0x[0-9A-Fa-f]+$
typeenumWire type of the parameter — stated by the caller, since method parameters have no object-table entry on the device to read it from.
Possible values: INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8, FLOAT, FLOAT64, DATETIME, STRING, BOOL, UUID, BIN, BIN_STREAM, STRING_STREAM, INT64_ARRAY, INT32_ARRAY, INT16_ARRAY, INT8_ARRAY, UINT64_ARRAY, UINT32_ARRAY, UINT16_ARRAY, UINT8_ARRAY, BOOL_ARRAY, UUID_ARRAY, FLOAT64_ARRAY, FLOAT_ARRAY, DATETIME_ARRAY, BIN_ARRAY, STRING_ARRAY
valueParameter value; INT64/UINT64 as decimal strings, BIN/UUID as base64.

Method call answered

The device answered a method call; carries the outcome.

EVENTCUSTOM_MESSAGE_RESULT

Payload

NameDescription
requestIdstringTies a method call to its answer across instances: whichever instance holds the device connection runs the call, and the one still holding the HTTP request matches the result by this id. Every other instance drops both.
outcomeWhat came of the call: the device's answer — ok, not_implemented or error — or failed when no answer was ever reached.
Alternative 1objectWhat came of the call: the device's answer — ok, not_implemented or error — or failed when no answer was ever reached.
typeWhich of the four outcomes this is; it decides which of the fields beside it are present.
responsearrayThe properties the device returned. Present on ok only.
idstringProperty id of the returned value, hexadecimal.
typeenumWire type of the returned property, as the device stated it.
Possible values: INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8, FLOAT, FLOAT64, DATETIME, STRING, BOOL, UUID, BIN, BIN_STREAM, STRING_STREAM, INT64_ARRAY, INT32_ARRAY, INT16_ARRAY, INT8_ARRAY, UINT64_ARRAY, UINT32_ARRAY, UINT16_ARRAY, UINT8_ARRAY, BOOL_ARRAY, UUID_ARRAY, FLOAT64_ARRAY, FLOAT_ARRAY, DATETIME_ARRAY, BIN_ARRAY, STRING_ARRAY
valueThe value, encoded as a method parameter is: INT64/UINT64 as decimal strings, BIN/UUID as base64. Null for a null property.
errorCodestringoptionalStands in place of a value when the device answered this parameter with an error property.
Alternative 2objectWhat came of the call: the device's answer — ok, not_implemented or error — or failed when no answer was ever reached.
typeWhich of the four outcomes this is; it decides which of the fields beside it are present.
Alternative 3objectWhat came of the call: the device's answer — ok, not_implemented or error — or failed when no answer was ever reached.
typeWhich of the four outcomes this is; it decides which of the fields beside it are present.
codeintegerThe device's own error code. The call itself ran — this is not an HTTP status and does not map to one.
messagestringoptionalThe device's own wording of the error, when it sent one.
detailsarrayProperties the device sent alongside its error code, in the same encoding as a returned value.
idstringProperty id of the returned value, hexadecimal.
typeenumWire type of the returned property, as the device stated it.
Possible values: INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8, FLOAT, FLOAT64, DATETIME, STRING, BOOL, UUID, BIN, BIN_STREAM, STRING_STREAM, INT64_ARRAY, INT32_ARRAY, INT16_ARRAY, INT8_ARRAY, UINT64_ARRAY, UINT32_ARRAY, UINT16_ARRAY, UINT8_ARRAY, BOOL_ARRAY, UUID_ARRAY, FLOAT64_ARRAY, FLOAT_ARRAY, DATETIME_ARRAY, BIN_ARRAY, STRING_ARRAY
valueThe value, encoded as a method parameter is: INT64/UINT64 as decimal strings, BIN/UUID as base64. Null for a null property.
errorCodestringoptionalStands in place of a value when the device answered this parameter with an error property.
Alternative 4objectWhat came of the call: the device's answer — ok, not_implemented or error — or failed when no answer was ever reached.
typeWhich of the four outcomes this is; it decides which of the fields beside it are present.
reasonstringWhy the call never reached an answer. On failed only, which the HTTP route turns into a 502.

Property write queued

A write toward a device was requested over the API — the echo of a PUT, carrying the requested updates, the retry budget and the immediate flag.

EVENTOBJECT_UPDATE_REQUEST

Payload

NameDescription
updatesarrayOne entry per property the message carries: what the device reported on OBJECT_UPDATED, what a caller asked to be written on OBJECT_UPDATE_REQUEST.
idstringProperty id in canonical hexadecimal form, e.g. 0x0800; requested writes carry this form, values reported by a device carry the decimal propId instead.
valueThe value, encoded by property type: INT64/UINT64 as decimal strings, BIN/UUID as base64. On a reported update it is present only when tag is value.
retriesintegerHow many delivery attempts the backend makes for the queued write (default 3).
min 0
immediatebooleanDeliver now or fail: when the device is offline the write is rejected instead of queued.

Property values reported

A device transmitted property values. updates carries one entry per property with per-property timestamps; history holds older samples overwritten in the same transmission.

EVENTOBJECT_UPDATED

Payload

NameDescription
updatesarrayOne entry per property the message carries: what the device reported on OBJECT_UPDATED, what a caller asked to be written on OBJECT_UPDATE_REQUEST.
transmittedAtintegerWhen the value reached the backend, UTC epoch milliseconds.
measuredAtintegeroptionalWhen the device measured the value, UTC epoch milliseconds; null when the device sent no timestamp.
historyarrayoptionalOlder samples the device overwrote inside the same transmission, reconstructed from its history block. Omitted when it sent none; the newest value travels in updates.
idstringProperty id the samples belong to, hexadecimal.
typeenumWire type the device stated for these samples. It is carried rather than inferred from the value — nothing in the JSON tells a uint16 from a float.
Possible values: INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8, FLOAT, FLOAT64, DATETIME, STRING, BOOL, UUID, BIN, BIN_STREAM, STRING_STREAM, INT64_ARRAY, INT32_ARRAY, INT16_ARRAY, INT8_ARRAY, UINT64_ARRAY, UINT32_ARRAY, UINT16_ARRAY, UINT8_ARRAY, BOOL_ARRAY, UUID_ARRAY, FLOAT64_ARRAY, FLOAT_ARRAY, DATETIME_ARRAY, BIN_ARRAY, STRING_ARRAY
samplesarrayThe recovered samples of this property.
measuredAtintegeroptionalWhen the device measured the sample, UTC epoch milliseconds; null when it sent no timestamp.
valueThe value, encoded as a live update's is.

Stream data received

A chunk of stream content arrived from the device.

EVENTSTREAM_CHUNK

Payload

NameDescription
propIdintegerThe property the stream belongs to, as a decimal number — event payloads carry property ids in decimal, not in the 0x0800 form the REST routes use.
> 0
seqintegerChunk counter within one stream, starting at 0. A reader orders by it and spots a gap with it; the byte position is offset.
min 0
offsetintegerByte position of this chunk within the stream. It counts everything delivered, so it keeps running even after the cached copy has hit its size limit.
min 0
encodingenumHow streamData is encoded: base64 for binary streams, utf8 for string streams.
Possible values: base64, utf8
datastringEither a device's user-defined metadata object — null when none was written — or stream content, as a string in the encoding encoding names.

Stream close requested

A client asked to close a running stream.

EVENTSTREAM_CLOSE_REQUEST

Payload

NameDescription
propIdintegerThe property the stream belongs to, as a decimal number — event payloads carry property ids in decimal, not in the 0x0800 form the REST routes use.
> 0

Stream ended

A stream ended: completed, expired, closed, failed, or the device disconnected.

EVENTSTREAM_CLOSED

Payload

NameDescription
propIdintegerThe property the stream belongs to, as a decimal number — event payloads carry property ids in decimal, not in the 0x0800 form the REST routes use.
> 0
reasonenumWhy it did not go through — a rejected parameter, a call the device's instance could not complete, a contract that does not hold up. On a stream it is instead the enumerated close reason.
Possible values: completed, expired, closed, failed, disconnected
sizeintegerSize of the loaded content in bytes.
min 0
truncatedbooleanWhether the cached content was cut off at the size limit.
errorstringoptionalThe failure message from the side that gave up. Present only when the stream closed as failed.

Stream open requested

A client asked to load or follow a stream property.

EVENTSTREAM_OPEN_REQUEST

Payload

NameDescription
propIdintegerThe property the stream belongs to, as a decimal number — event payloads carry property ids in decimal, not in the 0x0800 form the REST routes use.
> 0
modeenumload pulls the stream until EOF and caches it so it stays readable while the device is offline; live only forwards chunks and stores nothing.
Possible values: load, live
expiresInintegerTime until expiry, in seconds
> 0

Stream write ended

A stream write toward the device ended — completed or failed.

EVENTSTREAM_WRITE_CLOSED

Payload

NameDescription
propIdintegerThe property the stream belongs to, as a decimal number — event payloads carry property ids in decimal, not in the 0x0800 form the REST routes use.
> 0
streamIdstringoptionalCorrelates the write with the STREAM_WRITE_* actions it emits if the property turns out to be a stream; meaningless for scalar writes.
reasonenumWhy it did not go through — a rejected parameter, a call the device's instance could not complete, a contract that does not hold up. On a stream it is instead the enumerated close reason.
Possible values: completed, failed
writtenintegerBytes of the payload the device has acknowledged so far, against the total in size.
min 0
sizeintegerSize of the loaded content in bytes.
min 0
errorstringoptionalThe failure message from the side that gave up. Present only when the stream closed as failed.

Stream write progressing

A running stream write reported progress.

EVENTSTREAM_WRITE_PROGRESS

Payload

NameDescription
propIdintegerThe property the stream belongs to, as a decimal number — event payloads carry property ids in decimal, not in the 0x0800 form the REST routes use.
> 0
streamIdstringoptionalCorrelates the write with the STREAM_WRITE_* actions it emits if the property turns out to be a stream; meaningless for scalar writes.
writtenintegerBytes of the payload the device has acknowledged so far, against the total in size.
min 0
sizeintegerSize of the loaded content in bytes.
min 0

Stream write started

A stream write toward the device began; correlated to its PUT via streamId.

EVENTSTREAM_WRITE_STARTED

Payload

NameDescription
propIdintegerThe property the stream belongs to, as a decimal number — event payloads carry property ids in decimal, not in the 0x0800 form the REST routes use.
> 0
streamIdstringoptionalCorrelates the write with the STREAM_WRITE_* actions it emits if the property turns out to be a stream; meaningless for scalar writes.
sizeintegerSize of the loaded content in bytes.
min 0