Devices API
Actions in the devices namespace of the Nexigon Hub API.
devices_Query
POST /api/v1/actions/invoke/devices_Query Query the devices of the instance.
Request QueryDevicesAction
No fields.
Response QueryDevicesOutput
Fields (JSON object)
devicesrequiredList of devices.
array<QueryDevicesItem>
Items
QueryDevicesItem
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId
stringprojectId(fromproject_id) requiredProject ID of the device.
ProjectId
stringisConnected(fromis_connected) requiredIndicates whether the device is currently connected.
boolean
lastConnectedAt(fromlast_connected_at) optionalTimestamp when the device was last connected (current or most recent connection).
Timestamp
stringcurrentConnectionDurationSecs(fromcurrent_connection_duration_secs) optionalDuration of the current connection in seconds (null if not connected).
integer
devices_GetDetails
POST /api/v1/actions/invoke/devices_GetDetails Get information about a device.
Request GetDeviceDetailsAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId string
Response GetDeviceDetailsOutput
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringprojectId(fromproject_id) requiredProject ID of the device.
ProjectId stringfingerprintId(fromfingerprint_id) requiredFingerprint ID the device.
DeviceFingerprintId stringnameoptionalName of the device.
string isConnected(fromis_connected) requiredIndicates whether the device is online.
boolean certificatesrequiredCertificates of the device.
array<DeviceCertificate>
Items
DeviceCertificate
Fields (JSON object)
certificateId(fromcertificate_id) requiredID of the certificate.
DeviceCertificateId
stringstatusrequiredStatus of the certificate.
DeviceCertificateStatus
Cases externally
PendingThe certificate is pending.
Value: "Pending"ActiveThe certificate is active.
Value: "Active"RejectedThe certificate has been rejected.
Value: "Rejected"RevokedThe certificate has been revoked.
Value: "Revoked"ConflictThe certificate fingerprint was seen on multiple devices.
Value: "Conflict"
fingerprintrequiredFingerprint of the certificate.
CertificateFingerprint
stringfirstSeen(fromfirst_seen) requiredTimestamp when the certificate was first seen.
Timestamp
string
connectionsrequiredConnections of the device.
array<DeviceConnection>
Items
DeviceConnection
Fields (JSON object)
connectionId(fromconnection_id) requiredID of the connection.
DeviceConnectionId
stringnodeId(fromnode_id) requiredID of the cluster node.
ClusterNodeId
stringconnectedAt(fromconnected_at) requiredTimestamp when the connection was established.
Timestamp
stringconnectedForSecs(fromconnected_for_secs) requiredDuration of the connection in seconds.
integer
devices_Create
POST /api/v1/actions/invoke/devices_Create Create a new device.
Request CreateDeviceAction
Fields (JSON object)
projectId(fromproject_id) requiredID of the project.
ProjectId stringfingerprintrequiredFingerprint of the device.
DeviceFingerprint string
Response CreateDeviceOutput
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId string
devices_Delete
POST /api/v1/actions/invoke/devices_Delete Delete a device.
Request DeleteDeviceAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId string
Response Empty
No fields.
devices_SetName
POST /api/v1/actions/invoke/devices_SetName Set the name of a device.
Request SetDeviceNameAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringnameoptionalNew name of the device.
string
Response Empty
No fields.
devices_IssueDeviceToken
POST /api/v1/actions/invoke/devices_IssueDeviceToken Issue a JWT for a device with user-defined claims.
Note: Only use this action for integration with external systems.
Request IssueDeviceTokenAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringvalidForSecs(fromvalid_for_secs) optionalToken validity duration in seconds.
integer claimsoptionalAdditional user-defined claims.
JsonValue any
Response IssueDeviceTokenOutput
Fields (JSON object)
jwtrequiredIssued JWT.
Jwt
Wraps
string
devices_ValidateDeviceToken
POST /api/v1/actions/invoke/devices_ValidateDeviceToken Validate a device JWT.
Note: Only use this action for integration with external systems.
Request ValidateDeviceTokenAction
Fields (JSON object)
jwtrequiredJWT to validate.
Jwt
Wraps
string
Response ValidateDeviceTokenOutput
Cases
internally
β tag field result
InvalidThe JWT is invalid.
{ "result": "Invalid" }ValidThe JWT is valid.
{ "result": "Valid", ...<payload fields> } β or "content" for non-object payloadsValidateDeviceTokenSuccess
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId
stringclaimsrequiredUser-defined claims.
JsonValue
any
devices_AddCertificate
POST /api/v1/actions/invoke/devices_AddCertificate Add a device certificate.
Request AddDeviceCertificateAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringfingerprintrequiredFingerprint of the certificate.
CertificateFingerprint stringstatusoptionalInitial status of the certificate.
Defaults to
Pending.DeviceCertificateStatus
Cases externally
PendingThe certificate is pending.
Value: "Pending"ActiveThe certificate is active.
Value: "Active"RejectedThe certificate has been rejected.
Value: "Rejected"RevokedThe certificate has been revoked.
Value: "Revoked"ConflictThe certificate fingerprint was seen on multiple devices.
Value: "Conflict"
Response AddDeviceCertificateOutput
Fields (JSON object)
certificateId(fromcertificate_id) requiredID of the certificate.
DeviceCertificateId string
devices_DeleteCertificate
POST /api/v1/actions/invoke/devices_DeleteCertificate Delete a device certificate.
Request DeleteDeviceCertificateAction
Fields (JSON object)
certificateId(fromcertificate_id) requiredID of the certificate.
DeviceCertificateId string
Response Empty
No fields.
devices_SetCertificateStatus
POST /api/v1/actions/invoke/devices_SetCertificateStatus Set the status of a device certificate.
Request SetDeviceCertificateStatusAction
Fields (JSON object)
certificateId(fromcertificate_id) requiredID of the certificate.
DeviceCertificateId stringstatusrequiredNew status of the certificate.
DeviceCertificateStatus
Cases externally
PendingThe certificate is pending.
Value: "Pending"ActiveThe certificate is active.
Value: "Active"RejectedThe certificate has been rejected.
Value: "Rejected"RevokedThe certificate has been revoked.
Value: "Revoked"ConflictThe certificate fingerprint was seen on multiple devices.
Value: "Conflict"
Response Empty
No fields.
devices_RegisterConnection
POST /api/v1/actions/invoke/devices_RegisterConnection Register a connection of a device to a cluster node.
Request RegisterDeviceConnectionAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringnodeId(fromnode_id) requiredID of the cluster node.
ClusterNodeId stringconnectionId(fromconnection_id) requiredPre-generated ID of the connection.
DeviceConnectionId string
Response RegisterDeviceConnectionOutput
Fields (JSON object)
connectionId(fromconnection_id) requiredID of the connection.
DeviceConnectionId string
devices_UnregisterConnection
POST /api/v1/actions/invoke/devices_UnregisterConnection Unregister a connection of a device to a cluster node.
Request UnregisterDeviceConnectionAction
Fields (JSON object)
connectionId(fromconnection_id) requiredID of the connection.
DeviceConnectionId stringendReason(fromend_reason) requiredReason for ending the connection.
ConnectionEndReason
Cases externally
UnknownUnknown reason (fallback).
Value: "Unknown"DisconnectedDevice disconnected normally.
Value: "Disconnected"NodeCrashedConnection ended due to cluster node crash or heartbeat timeout.
Value: "NodeCrashed"ServerShutdownConnection ended due to graceful server shutdown.
Value: "ServerShutdown"
Response Empty
No fields.
devices_QueryConnections
POST /api/v1/actions/invoke/devices_QueryConnections Query the connection history of a device.
Request QueryDeviceConnectionsAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringlimitoptionalLimit results (default 100).
integer activeOnly(fromactive_only) optionalInclude only active connections.
boolean
Response QueryDeviceConnectionsOutput
Fields (JSON object)
connectionsrequiredList of connections.
array<DeviceConnectionLog>
Items
DeviceConnectionLog
Fields (JSON object)
connectionId(fromconnection_id) requiredID of the connection.
DeviceConnectionId
stringnodeId(fromnode_id) requiredID of the cluster node.
ClusterNodeId
stringconnectedAt(fromconnected_at) requiredTimestamp when the connection was established.
Timestamp
stringendedAt(fromended_at) optionalTimestamp when the connection ended (null if still connected).
Timestamp
stringendReason(fromend_reason) optionalReason why the connection ended (null if still connected).
ConnectionEndReason
Cases externally
UnknownUnknown reason (fallback).
Value: "Unknown"DisconnectedDevice disconnected normally.
Value: "Disconnected"NodeCrashedConnection ended due to cluster node crash or heartbeat timeout.
Value: "NodeCrashed"ServerShutdownConnection ended due to graceful server shutdown.
Value: "ServerShutdown"
durationSecs(fromduration_secs) requiredDuration of the connection in seconds.
integer
devices_IssueHttpProxyToken
POST /api/v1/actions/invoke/devices_IssueHttpProxyToken Issue a HTTP proxy JWT.
Request IssueDeviceHttpProxyTokenAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringvalidForSecs(fromvalid_for_secs) optionalToken validity duration in seconds.
integer hostnameoptionalHostname to accept requests for.
Defaults to a device-specific pseudo-random subdomain of the instance domain.
string portoptionalDevice port to proxy to.
Defaults to
80.integer redirectoptionalRedirect URL in case the token is expired or invalid.
string
Response IssueDeviceHttpProxyTokenOutput
Fields (JSON object)
jwtrequiredJWT proxy token.
Jwt
Wraps
string
urlrequiredProxy URL.
string
devices_ValidateHttpProxyToken
POST /api/v1/actions/invoke/devices_ValidateHttpProxyToken Validate a HTTP proxy JWT.
Request ValidateDeviceHttpProxyTokenAction
Fields (JSON object)
jwtrequiredJWT to validate.
Jwt
Wraps
string
Response ValidateDeviceHttpProxyTokenOutput
Cases
internally
β tag field result
InvalidThe JWT is invalid.
{ "result": "Invalid", ...<payload fields> } β or "content" for non-object payloadsValidateDeviceHttpProxyTokenInvalid
Fields (JSON object)
redirectoptionalURL to redirect to.
string
ValidThe JWT is valid.
{ "result": "Valid", ...<payload fields> } β or "content" for non-object payloadsValidateDeviceHttpProxyTokenSuccess
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId
stringhostnameoptionalHostname to accept requests for.
string
portoptionalDevice port to proxy to.
integer
devices_PublishEvents
POST /api/v1/actions/invoke/devices_PublishEvents Publish device events.
Request PublishDeviceEventsAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringeventsrequiredEvents to push.
array<DeviceEvent>
Items
DeviceEvent
Fields (JSON object)
eventId(fromevent_id) requiredID of the event.
DeviceEventId
stringcategoryoptionalEvent category (optional, low-cardinality category of the event).
string
severityrequiredSeverity of the event.
DeviceEventSeverity
Cases externally
TraceTracing event.
Value: "Trace"DebugDebugging event.
Value: "Debug"InfoInformational even.
Value: "Info"WarningWarning event.
Value: "Warning"ErrorError event.
Value: "Error"CriticalCritical event.
Value: "Critical"
bodyrequiredEvent body.
JsonValue
anyattributesrequiredEvent attributes.
object<string, JsonValue>
Keys
string
Values
JsonValue
anyemittedAt(fromemitted_at) requiredTimestamp when the event was emitted.
Timestamp
stringreceivedAt(fromreceived_at) optionalTimestamp when the event was received.
Timestamp
string
Response Empty
No fields.
devices_QueryEvents
POST /api/v1/actions/invoke/devices_QueryEvents Query device events.
Request QueryDeviceEventsAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringlimitoptionalLimit the number of events to return.
Default to
100.integer
Response QueryDeviceEventsOutput
Fields (JSON object)
eventsrequiredList of events.
array<DeviceEvent>
Items
DeviceEvent
Fields (JSON object)
eventId(fromevent_id) requiredID of the event.
DeviceEventId
stringcategoryoptionalEvent category (optional, low-cardinality category of the event).
string
severityrequiredSeverity of the event.
DeviceEventSeverity
Cases externally
TraceTracing event.
Value: "Trace"DebugDebugging event.
Value: "Debug"InfoInformational even.
Value: "Info"WarningWarning event.
Value: "Warning"ErrorError event.
Value: "Error"CriticalCritical event.
Value: "Critical"
bodyrequiredEvent body.
JsonValue
anyattributesrequiredEvent attributes.
object<string, JsonValue>
Keys
string
Values
JsonValue
anyemittedAt(fromemitted_at) requiredTimestamp when the event was emitted.
Timestamp
stringreceivedAt(fromreceived_at) optionalTimestamp when the event was received.
Timestamp
string
devices_SetProperty
POST /api/v1/actions/invoke/devices_SetProperty Set a property of a device.
Request SetDevicePropertyAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringnamerequiredName of the property.
string valuerequiredValue of the property.
JsonValue anyprotectedoptionalIndicates whether the property should be protected.
boolean expectedVersion(fromexpected_version) optionalIf set, the property is only updated when its current version matches this value (compare-and-swap). Returns
VersionConflictwhen the version does not match, orDeletedwhen the property no longer exists.integer (i64)
Response SetDevicePropertyOutput
Cases
internally
β tag field result
SetThe property was set successfully.
{ "result": "Set" }VersionConflictThe property was not updated because its version did not match the expected version (compare-and-swap conflict).
{ "result": "VersionConflict", ...<payload fields> } β or "content" for non-object payloadsSetDevicePropertyVersionConflict
Fields (JSON object)
currentVersion(fromcurrent_version) requiredThe current version of the property.
integer (i64)
DeletedThe property was not updated because it has been deleted while an expected version was specified.
{ "result": "Deleted" }
devices_GetProperty
POST /api/v1/actions/invoke/devices_GetProperty Get a property of a device.
Request GetDevicePropertyAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringnamerequiredName of the property.
string
Response GetDevicePropertyOutput
Cases
internally
β tag field result
NotFoundThe property was not found.
{ "result": "NotFound" }FoundThe property was found.
{ "result": "Found", ...<payload fields> } β or "content" for non-object payloadsDeviceProperty
Fields (JSON object)
namerequiredName of the property.
string
valuerequiredValue of the property.
JsonValue
anyprotectedrequiredIndicates whether the property is protected.
boolean
versionrequiredIncremental version number, incremented on each update.
integer (i64)
lastUpdated(fromlast_updated) requiredLast time the property was updated.
Timestamp
string
devices_RemoveProperty
POST /api/v1/actions/invoke/devices_RemoveProperty Remove a property from a device.
Request RemoveDevicePropertyAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId stringnamerequiredName of the property.
string
Response RemoveDevicePropertyOutput
Cases
internally
β tag field result
NotFoundThe property was not found.
{ "result": "NotFound" }RemovedThe property was removed.
{ "result": "Removed" }
devices_QueryProperties
POST /api/v1/actions/invoke/devices_QueryProperties Query the properties of a device.
Request QueryDevicePropertiesAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId string
Response QueryDevicePropertiesOutput
Fields (JSON object)
propertiesrequiredList of properties.
object<string, DeviceProperty>
Keys
string
Values
DeviceProperty
Fields (JSON object)
namerequiredName of the property.
string
valuerequiredValue of the property.
JsonValue
anyprotectedrequiredIndicates whether the property is protected.
boolean
versionrequiredIncremental version number, incremented on each update.
integer (i64)
lastUpdated(fromlast_updated) requiredLast time the property was updated.
Timestamp
string
devices_QueryAuditLog
POST /api/v1/actions/invoke/devices_QueryAuditLog Query the audit log of a device.
Request QueryDeviceAuditLogAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId string
Response QueryDeviceAuditLogOutput
Fields (JSON object)
eventsrequiredList of audit log events.
array<AuditLogEvent>
Items
AuditLogEvent
Fields (JSON object)
eventId(fromevent_id) requiredID of the audit log event.
AuditLogEventId
stringactorrequiredActor causing the event.
Actor
Cases internally β tag field
actorAnonymousAn anonymous, unauthenticated actor.
{ "actor": "Anonymous", ...<payload fields> } β or "content" for non-object payloadsAnonymousActor
No fields.
SystemThe system itself, typically used for internal actions.
{ "actor": "System", ...<payload fields> } β or "content" for non-object payloadsSystemActor
No fields.
DeviceA device authenticated via a specific deployment token.
{ "actor": "Device", ...<payload fields> } β or "content" for non-object payloadsDeviceActor
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId
stringtokenId(fromtoken_id) requiredID of the deployment token used for authentication.
DeploymentTokenId
string
UserA user typically authenticated via a user session.
{ "actor": "User", ...<payload fields> } β or "content" for non-object payloadsUserActor
Fields (JSON object)
userId(fromuser_id) requiredID of the user.
UserId
string
UserTokenA user authenticated via a specific token.
{ "actor": "UserToken", ...<payload fields> } β or "content" for non-object payloadsUserTokenActor
Fields (JSON object)
userId(fromuser_id) requiredID of the user.
UserId
stringtokenId(fromtoken_id) requiredID of the user token used for authentication.
UserTokenId
string
ClusterNodeA cluster node.
{ "actor": "ClusterNode", ...<payload fields> } β or "content" for non-object payloadsClusterNodeActor
Fields (JSON object)
nodeId(fromnode_id) requiredID of the cluster node.
ClusterNodeId
string
OrganizationApiTokenAn organization API token.
{ "actor": "OrganizationApiToken", ...<payload fields> } β or "content" for non-object payloadsOrganizationApiTokenActor
Fields (JSON object)
organizationId(fromorganization_id) requiredID of the organization.
OrganizationId
stringtokenId(fromtoken_id) requiredID of the API token.
OrganizationApiTokenId
string
eventrequiredType of the event that was recorded.
string
datarequiredAdditional audit data associated with the event.
JsonValue
anycreatedAt(fromcreated_at) requiredTimestamp indicating when the audit log event was recorded.
Timestamp
stringactionoptionalAction the event has been caused by (if any).
AuditLogEventAction
Fields (JSON object)
actionId(fromaction_id) requiredID of the action.
AuditLogActionId
string
joboptionalJob the event has been caused by (if any).
AuditLogEventJob
Fields (JSON object)
jobId(fromjob_id) requiredID of the job.
JobId
string
devices_QueryCommands
POST /api/v1/actions/invoke/devices_QueryCommands Query the on-demand commands supported by a device.
Request QueryDeviceCommandsAction
Fields (JSON object)
deviceId(fromdevice_id) requiredID of the device.
DeviceId string
Response QueryDeviceCommandsOutput
Fields (JSON object)
manifestrequiredCommand manifest.
DeviceCommandManifest
Fields (JSON object)
commandsrequiredAvailable commands.
array<DeviceCommandDescriptor>
Items
DeviceCommandDescriptor
Fields (JSON object)
namerequiredCommand name.
string
descriptionoptionalDescription of what the command does.
string
categoryoptionalCategory for grouping in the UI.
string
inputoptionalJSON Schema for the command input.
JsonValue
anyoutputoptionalJSON Schema for the command output.
JsonValue
any