Overview#
Receive real-time notifications about the completion status of asynchronous commands.Command Status Messages#
Message Type: X-DPT-CAB-IDMessage Structure#
{
"data": {
"type": "X-DPT-CAB-ID",
"id": "23f7978a-5561-4718-84ca-c38d7db0843c",
"command_status": 2,
"body": "Command completed successfully"
}
}
Message Fields#
| Field | Description |
|---|
type | Message type identifier (X-DPT-CAB-ID) |
id | Unique command identifier returned when operation was initiated |
command_status | Current status of the command |
body | Status message or additional information |
Command Status Values#
| Value | Status | Description |
|---|
1 | Pending | Command is being processed |
2 | Success | Command completed successfully |
3 | Failed | Command failed |
Handling Messages#
Use Case#
Command status messages provide immediate feedback for asynchronous operations instead of requiring repeated polling. Operations that generate command status messages include:Device approval/rejection
Storage device registration
Authenticator registration
1.
Initiate profile registration via API
2.
API returns command identifier
3.
Subscribe to WebSocket notifications using the command ID
4.
Receive real-time status updates as registration processes
5.
Handle success or failure immediately
Command IDs are unique and can be used as event identifiers
Messages are delivered only to clients authenticated with the correct profile token
Status value 1 (Pending) may appear multiple times as processing progresses
Always handle both success (2) and failure (3) cases
Remove event listeners after processing to prevent memory leaks