Skip to content

Set the power budget

POST
/api/v1/budget
curl --request POST \
--url http://pwrman.local/api/v1/budget \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "watts": 240 }'

The total power the ports may promise their devices. Saved, and applied at once. The same value is budget_w in the settings.

Media typeapplication/json
object
watts
required
integer
>= 15 <= 600

Example

{
"watts": 240
}

Done.

Media typeapplication/json
object
ok
required
boolean

Example

{
"ok": true
}

The value is outside 15–600 W.

Media typeapplication/json
object
error
required

Why the request was refused, in words.

string

Example

{
"error": "watts out of range"
}

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 controller is busy with another request. Try again.

Media typeapplication/json
object
error
required

Why the request was refused, in words.

string

Example

{
"error": "busy, retry"
}

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