Docs/Fleet Commands
Fleet Management

Fleet Commands

Overview

Commands allow you to control devices remotely. Every command is authenticated, logged in the audit trail, and tracked through its lifecycle.


Send a command

const command = await sentinel.commands.send({
  robotId: 'clx1a2b3c...',
  type: 'REBOOT',
  payload: { reason: 'scheduled-maintenance' },
});

Command types

| Type | Description | |------|-------------| | STATUS_CHECK | Request current device state | | REBOOT | Restart the device | | UPDATE_FIRMWARE | Initiate firmware update | | EMERGENCY_STOP | Immediate halt — highest priority | | CUSTOM | Application-specific command with payload |


Lifecycle

Commands progress through defined states:

PENDING → SENT → ACKNOWLEDGED → COMPLETED
                              → FAILED

Monitor status via polling or WebSocket subscription.


Batch commands

Send the same command to multiple devices:

await sentinel.commands.sendBatch({
  robotIds: ['device-1', 'device-2', 'device-3'],
  type: 'UPDATE_FIRMWARE',
  payload: { version: '2.5.0' },
});

Command history

const history = await sentinel.commands.list({
  robotId: 'clx1a2b3c...',
  limit: 20,
  status: 'completed',
});

Permissions

Command dispatch requires the fleet:write scope. Read-only API keys cannot send commands.

All commands are recorded in the immutable audit log with:

  • Issuer identity
  • Timestamp
  • Command type and payload
  • Execution result

This provides full traceability for compliance and incident investigation.