Devices API
Actions in the devices namespace of the Nexigon Hub API.
devices_Query
POST/api/v1/actions/invoke/devices_QueryQuery 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.
DeviceIdstringprojectId(fromproject_id)requiredProject ID of the device.
ProjectIdstringisConnected(fromis_connected)requiredIndicates whether the device is currently connected.
booleanlastConnectedAt(fromlast_connected_at)optionalTimestamp when the device was last connected (current or most recent connection).
TimestampstringcurrentConnectionDurationSecs(fromcurrent_connection_duration_secs)optionalDuration of the current connection in seconds (null if not connected).
integer
devices_GetDetails
POST/api/v1/actions/invoke/devices_GetDetailsGet information about a device.
Request GetDeviceDetailsAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstring
Response GetDeviceDetailsOutput
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstringprojectId(fromproject_id)requiredProject ID of the device.
ProjectIdstringfingerprintId(fromfingerprint_id)requiredFingerprint ID the device.
DeviceFingerprintIdstringnameoptionalName of the device.
stringisConnected(fromis_connected)requiredIndicates whether the device is online.
booleancertificatesrequiredCertificates of the device.
array<DeviceCertificate>
Items
DeviceCertificate
Fields (JSON object)
certificateId(fromcertificate_id)requiredID of the certificate.
DeviceCertificateIdstringstatusrequiredStatus of the certificate.
DeviceCertificateStatus
Casesexternally
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.
CertificateFingerprintstringfirstSeen(fromfirst_seen)requiredTimestamp when the certificate was first seen.
Timestampstring
connectionsrequiredConnections of the device.
array<DeviceConnection>
Items
DeviceConnection
Fields (JSON object)
connectionId(fromconnection_id)requiredID of the connection.
DeviceConnectionIdstringnodeId(fromnode_id)requiredID of the cluster node.
ClusterNodeIdstringconnectedAt(fromconnected_at)requiredTimestamp when the connection was established.
TimestampstringconnectedForSecs(fromconnected_for_secs)requiredDuration of the connection in seconds.
integer
devices_Create
POST/api/v1/actions/invoke/devices_CreateCreate a new device.
Request CreateDeviceAction
Fields (JSON object)
projectId(fromproject_id)requiredID of the project.
ProjectIdstringfingerprintrequiredFingerprint of the device.
DeviceFingerprintstring
Response CreateDeviceOutput
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstring
devices_Delete
POST/api/v1/actions/invoke/devices_DeleteDelete a device.
Request DeleteDeviceAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstring
Response Empty
No fields.
devices_SetName
POST/api/v1/actions/invoke/devices_SetNameSet the name of a device.
Request SetDeviceNameAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstringnameoptionalNew name of the device.
string
Response Empty
No fields.
devices_IssueDeviceToken
POST/api/v1/actions/invoke/devices_IssueDeviceTokenIssue 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.
DeviceIdstringvalidForSecs(fromvalid_for_secs)optionalToken validity duration in seconds.
integerclaimsoptionalAdditional user-defined claims.
JsonValueany
Response IssueDeviceTokenOutput
Fields (JSON object)
jwtrequiredIssued JWT.
Jwt
Wraps
string
devices_ValidateDeviceToken
POST/api/v1/actions/invoke/devices_ValidateDeviceTokenValidate 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
Casesinternally β 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.
DeviceIdstringclaimsrequiredUser-defined claims.
JsonValueany
devices_AddCertificate
POST/api/v1/actions/invoke/devices_AddCertificateAdd a device certificate.
Request AddDeviceCertificateAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstringfingerprintrequiredFingerprint of the certificate.
CertificateFingerprintstringstatusoptionalInitial status of the certificate.
Defaults to
Pending.DeviceCertificateStatus
Casesexternally
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.
DeviceCertificateIdstring
devices_DeleteCertificate
POST/api/v1/actions/invoke/devices_DeleteCertificateDelete a device certificate.
Request DeleteDeviceCertificateAction
Fields (JSON object)
certificateId(fromcertificate_id)requiredID of the certificate.
DeviceCertificateIdstring
Response Empty
No fields.
devices_SetCertificateStatus
POST/api/v1/actions/invoke/devices_SetCertificateStatusSet the status of a device certificate.
Request SetDeviceCertificateStatusAction
Fields (JSON object)
certificateId(fromcertificate_id)requiredID of the certificate.
DeviceCertificateIdstringstatusrequiredNew status of the certificate.
DeviceCertificateStatus
Casesexternally
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_RegisterConnectionRegister a connection of a device to a cluster node.
Request RegisterDeviceConnectionAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstringnodeId(fromnode_id)requiredID of the cluster node.
ClusterNodeIdstringconnectionId(fromconnection_id)requiredPre-generated ID of the connection.
DeviceConnectionIdstring
Response RegisterDeviceConnectionOutput
Fields (JSON object)
connectionId(fromconnection_id)requiredID of the connection.
DeviceConnectionIdstring
devices_UnregisterConnection
POST/api/v1/actions/invoke/devices_UnregisterConnectionUnregister a connection of a device to a cluster node.
Request UnregisterDeviceConnectionAction
Fields (JSON object)
connectionId(fromconnection_id)requiredID of the connection.
DeviceConnectionIdstringendReason(fromend_reason)requiredReason for ending the connection.
ConnectionEndReason
Casesexternally
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_QueryConnectionsQuery the connection history of a device.
Request QueryDeviceConnectionsAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstringlimitoptionalLimit results (default 100).
integeractiveOnly(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.
DeviceConnectionIdstringnodeId(fromnode_id)requiredID of the cluster node.
ClusterNodeIdstringconnectedAt(fromconnected_at)requiredTimestamp when the connection was established.
TimestampstringendedAt(fromended_at)optionalTimestamp when the connection ended (null if still connected).
TimestampstringendReason(fromend_reason)optionalReason why the connection ended (null if still connected).
ConnectionEndReason
Casesexternally
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_IssueHttpProxyTokenIssue a HTTP proxy JWT.
Request IssueDeviceHttpProxyTokenAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstringvalidForSecs(fromvalid_for_secs)optionalToken validity duration in seconds.
integerhostnameoptionalHostname to accept requests for.
Defaults to a device-specific pseudo-random subdomain of the instance domain.
stringportoptionalDevice port to proxy to.
Defaults to
80.integerredirectoptionalRedirect URL in case the token is expired or invalid.
string
Response IssueDeviceHttpProxyTokenOutput
Fields (JSON object)
jwtrequiredJWT proxy token.
Jwt
Wraps
stringurlrequiredProxy URL.
string
devices_ValidateHttpProxyToken
POST/api/v1/actions/invoke/devices_ValidateHttpProxyTokenValidate a HTTP proxy JWT.
Request ValidateDeviceHttpProxyTokenAction
Fields (JSON object)
jwtrequiredJWT to validate.
Jwt
Wraps
string
Response ValidateDeviceHttpProxyTokenOutput
Casesinternally β 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.
DeviceIdstringhostnameoptionalHostname to accept requests for.
stringportoptionalDevice port to proxy to.
integer
devices_PublishEvents
POST/api/v1/actions/invoke/devices_PublishEventsPublish device events.
Request PublishDeviceEventsAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstringeventsrequiredEvents to push.
array<DeviceEvent>
Items
DeviceEvent
Fields (JSON object)
eventId(fromevent_id)requiredID of the event.
DeviceEventIdstringcategoryoptionalEvent category (optional, low-cardinality category of the event).
stringseverityrequiredSeverity of the event.
DeviceEventSeverity
Casesexternally
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.
JsonValueanyattributesrequiredEvent attributes.
object<string, JsonValue>
Keys
stringValues
JsonValueanyemittedAt(fromemitted_at)requiredTimestamp when the event was emitted.
TimestampstringreceivedAt(fromreceived_at)optionalTimestamp when the event was received.
Timestampstring
Response Empty
No fields.
devices_QueryEvents
POST/api/v1/actions/invoke/devices_QueryEventsQuery device events.
Request QueryDeviceEventsAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstringlimitoptionalLimit 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.
DeviceEventIdstringcategoryoptionalEvent category (optional, low-cardinality category of the event).
stringseverityrequiredSeverity of the event.
DeviceEventSeverity
Casesexternally
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.
JsonValueanyattributesrequiredEvent attributes.
object<string, JsonValue>
Keys
stringValues
JsonValueanyemittedAt(fromemitted_at)requiredTimestamp when the event was emitted.
TimestampstringreceivedAt(fromreceived_at)optionalTimestamp when the event was received.
Timestampstring
devices_SetProperty
POST/api/v1/actions/invoke/devices_SetPropertySet a property of a device.
Request SetDevicePropertyAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstringnamerequiredName of the property.
stringvaluerequiredValue of the property.
JsonValueanyprotectedoptionalIndicates whether the property should be protected.
booleanexpectedVersion(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
Casesinternally β 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_GetPropertyGet a property of a device.
Request GetDevicePropertyAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstringnamerequiredName of the property.
string
Response GetDevicePropertyOutput
Casesinternally β 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.
stringvaluerequiredValue of the property.
JsonValueanyprotectedrequiredIndicates whether the property is protected.
booleanversionrequiredIncremental version number, incremented on each update.
integer (i64)lastUpdated(fromlast_updated)requiredLast time the property was updated.
Timestampstring
devices_RemoveProperty
POST/api/v1/actions/invoke/devices_RemovePropertyRemove a property from a device.
Request RemoveDevicePropertyAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstringnamerequiredName of the property.
string
Response RemoveDevicePropertyOutput
Casesinternally β tag field result
NotFoundThe property was not found.
{ "result": "NotFound" }RemovedThe property was removed.
{ "result": "Removed" }
devices_QueryProperties
POST/api/v1/actions/invoke/devices_QueryPropertiesQuery the properties of a device.
Request QueryDevicePropertiesAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstring
Response QueryDevicePropertiesOutput
Fields (JSON object)
propertiesrequiredList of properties.
object<string, DeviceProperty>
Keys
stringValues
DeviceProperty
Fields (JSON object)
namerequiredName of the property.
stringvaluerequiredValue of the property.
JsonValueanyprotectedrequiredIndicates whether the property is protected.
booleanversionrequiredIncremental version number, incremented on each update.
integer (i64)lastUpdated(fromlast_updated)requiredLast time the property was updated.
Timestampstring
devices_QueryAuditLog
POST/api/v1/actions/invoke/devices_QueryAuditLogQuery the audit log of a device.
Request QueryDeviceAuditLogAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstring
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.
AuditLogEventIdstringactorrequiredActor causing the event.
Actor
Casesinternally β 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.
DeviceIdstringtokenId(fromtoken_id)requiredID of the deployment token used for authentication.
DeploymentTokenIdstring
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.
UserIdstring
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.
UserIdstringtokenId(fromtoken_id)requiredID of the user token used for authentication.
UserTokenIdstring
ClusterNodeA cluster node.
{ "actor": "ClusterNode", ...<payload fields> } β or "content" for non-object payloadsClusterNodeActor
Fields (JSON object)
nodeId(fromnode_id)requiredID of the cluster node.
ClusterNodeIdstring
OrganizationApiTokenAn organization API token.
{ "actor": "OrganizationApiToken", ...<payload fields> } β or "content" for non-object payloadsOrganizationApiTokenActor
Fields (JSON object)
organizationId(fromorganization_id)requiredID of the organization.
OrganizationIdstringtokenId(fromtoken_id)requiredID of the API token.
OrganizationApiTokenIdstring
eventrequiredType of the event that was recorded.
stringdatarequiredAdditional audit data associated with the event.
JsonValueanycreatedAt(fromcreated_at)requiredTimestamp indicating when the audit log event was recorded.
TimestampstringactionoptionalAction the event has been caused by (if any).
AuditLogEventAction
Fields (JSON object)
actionId(fromaction_id)requiredID of the action.
AuditLogActionIdstring
joboptionalJob the event has been caused by (if any).
AuditLogEventJob
Fields (JSON object)
jobId(fromjob_id)requiredID of the job.
JobIdstring
devices_QueryCommands
POST/api/v1/actions/invoke/devices_QueryCommandsQuery the on-demand commands supported by a device.
Request QueryDeviceCommandsAction
Fields (JSON object)
deviceId(fromdevice_id)requiredID of the device.
DeviceIdstring
Response QueryDeviceCommandsOutput
Fields (JSON object)
manifestrequiredCommand manifest.
DeviceCommandManifest
Fields (JSON object)
commandsrequiredAvailable commands.
array<DeviceCommandDescriptor>
Items
DeviceCommandDescriptor
Fields (JSON object)
namerequiredCommand name.
stringdescriptionoptionalDescription of what the command does.
stringcategoryoptionalCategory for grouping in the UI.
stringinputoptionalJSON Schema for the command input.
JsonValueanyoutputoptionalJSON Schema for the command output.
JsonValueany