Skip to content

Run console commands

POST
/api/v1/console
curl --request POST \
--url http://pwrman.local/api/v1/console \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/plain' \
--data 'status
faults
'

Console commands as text, one per line, under 2048 bytes in all. The reply is for people to read, and its wording can change in any release; programs should use the JSON requests instead. The commands are listed in the console reference. Some commands are refused here, and the transcript says so.

Media typetext/plain
string

Example

status
faults

Started. The result shows up later.

Media typeapplication/json
object
ok
required
boolean

Example

{
"ok": true
}

The body is empty.

Media typeapplication/json
object
error
required

Why the request was refused, in words.

string

Example

{
"error": "no command"
}

The token is missing or wrong, or no token is set yet.

Media typeapplication/json
object
error
required

Why the request was refused, in words.

string

Examples

{
"error": "bearer token required"
}

The last batch is still running or still being read.

Media typeapplication/json
object
error
required

Why the request was refused, in words.

string

Example

{
"error": "the last commands are still running"
}

The body is 2048 bytes or more.

Media typeapplication/json
object
error
required

Why the request was refused, in words.

string

Example generated

{
"error": "example"
}

USB Type-C® and USB-C® are registered trademarks of USB Implementers Forum.