Skip to main content

Tables

Devices​

The devices table stores the list of all the devices for a certain realm and all their metadata, including the introspection, the device status and credentials information.

Column NameColumn TypeDescription
device_iduuidDevice unique 128 bits ID.
aliasesmap<ascii, varchar>Alias purpose and alias map.
introspectionmap<ascii, int>Device interface name to interface major version map based on most recent device introspection.
introspection_minormap<ascii, int>Device interface name to interface minor version map based on most recent device introspection.
old_introspectionmap<frozen<tuple<ascii, int>>, int>All previous device interfaces. This column is used to keep track of all interfaces that have been used and might still have some recorded data. The column maps interface (name, major) to minor.
protocol_revisionintSpoken Data Orchestrator MQTT v1 protocol revision.
first_registrationtimestampFirst registration attempt timestamp.
credentials_secretasciiThe bcrypt hash of the credential secret, that the device uses to obtain new credentials.
inhibit_credentials_requestbooleanBan device credentials renewal, device will be able to connect to the transport up to the credential expiry.
cert_serialasciiDevice certificate serial used by the CA.
cert_akiasciiDevice certificate Authority Key Identifier.
first_credentials_requesttimestampFirst credentials request timestamp.
last_connectiontimestampMost recent device connection event timestamp.
last_disconnectiontimestampMost recent device disconnection event timestamp.
connectedbooleanTrue if the device is connected, otherwise is false.
pending_empty_cachebooleanDevice is in an unclean state and an empty cache message is being waited.
total_received_msgsbigintCount of received messages since the device registration.
total_received_bytesbigintAmount of received messages bytes since the device registration.
exchanged_msgs_by_interfacebigintCount of exchanged messages since the device registration.
exchanged_bytes_by_interfacebigintAmount of exchanged messages bytes since the device registration.
last_credentials_request_ipinetDevice IP address used during the last credential request.
last_seen_ipinetMost recent device IP address.
attributesmap<varchar, varchar>Device attributes. It can contain arbitrary string key and values associated with the device.
groupsmap<varchar, timeuuid>Groups which the device belongs to, the key is the group name, and the value is its insertion timeuuid, which is used as part of the key on grouped_devices table.

Endpoints​

The endpoints table stores the list of all endpoints of all interfaces for realm, with all the data needed to define an endpoint, such as retention, reliability, value type and so on.

Column NameColumn TypeDescription
interface_iduuidInterface unique 128 bits ID.
endpoint_iduuidEndpoint unique 128 bits ID.
interface_nameasciiHuman-readable name for interface.
interface_major_versionintInterface major version related to the endpoint.
interface_minor_versionintInterface minor version related to the endpoint.
interface_typeintInterface type identifier related to the endpoint.
endpointasciiHuman-readable endpoint string.
value_typeintValue type identifier related to the endpoint.
reliabilityintReliability identifier related to the endpoint.
retentionintRetention identifier related to the endpoint.
expiryintExpiry identifier related to the endpoint.
database_retention_ttlintMilliseconds before data deletion.
database_retention_policyintDatabase_retention_policy identifier related to the endpoint.
allow_unsetbooleanEnable or disable possibility of setting value to null.
explicit_timestampbooleanSet or unset explicit timestamp.
descriptionvarcharDescription of endpoint.
docvarcharDocumentation for endpoint.

Interfaces​

The interfaces table stores the list of all interfaces for realm, with all the data needed to define an endpoint, such as retention, reliability, value type and so on.

Column NameColumn TypeDescription
interface_iduuidInterface unique 128 bits ID.
nameasciiHuman-readable name for interface.
major_versionintInterface major version related to the endpoint.
minor_versionintInterface minor version related to the endpoint.
storage_typeintStorage type identifier related to the endpoint.
storageasciiInterface storage.
typeintIdentifies the type of this Interface. Currently two types are supported: datastream and properties.
ownershipintIdentifies the quality of the interface. Interfaces are meant to be unidirectional, and this property defines who's sending or receiving data.
aggregationintIdentifies the aggregation of the mappings of the interface.
automaton_transitionsblobAutomaton internal field.
automaton_accepting_statesblobAutomaton internal field.
descriptionvarcharDescription of interface.
docvarcharDocumentation of interface.