Skip to content

Send a remote command to a device​

POST
/devices/{device-id}/commands

Sends one of the allowlisted Pantavisor commands (REBOOT_DEVICE, RUN_GC,
ENABLE_SSH, DISABLE_SSH, LIST_CONTAINERS, LIST_GROUPS, LIST_DAEMONS,
LIST_DRIVERS, LIST_WAKELOCKS, GET_XCONNECT_GRAPH, LIST_LOG_SOURCES) to a device
connected to Pantahub over MQTT, through the device's Pantahub credential. Requires
device update permission. REBOOT_DEVICE takes an optional args.message (string, at
most 1 KiB), LIST_LOG_SOURCES an optional args.rev (revision name, "current" by
default); every other argument is dropped. The credential needs the Pantahub
devices.commands scope or full API access.

Authorizations​

Parameters​

Path Parameters

device-id*

device id

Type
string
Required

Request Body​

application/json
JSON
{
  
"args": {
  
  
"additionalProperties": undefined
  
},
  
"cmd": "LIST_CONTAINERS"
}

Responses​

Command, pending until the device answers

application/json
JSON
{
  
"args": {
  
  
"additionalProperties": undefined
  
},
  
"cmd": "string",
  
"code": 0,
  
"created_at": "string",
  
"created_by": "string",
  
"device_id": "string",
  
"error": "string",
  
"expires_at": "string",
  
"finished_at": "string",
  
"id": "string",
  
"output": {
  
},
  
"status": "string"
}

Playground​

Variables
Key
Value
Body

Samples​

Powered by VitePress OpenAPI