Skip to content

Keep this computer awake for a while

POST
/api/v1/keep-awake/session
curl --request POST \
--url http://127.0.0.1:8484/api/v1/keep-awake/session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "action": "start", "dryRun": true, "minutes": 1, "until": "example" }'

Owners only. Keeps the computer Exhale runs on awake now, whatever the rule of set_keep_awake says: action start for minutes, until a time of day (HH:MM, household time zone) or until stopped; extend adds minutes; stop ends it. A session survives a restart of the computer with the time it had left. Can be reverted with undo.

Media typeapplication/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
action
required
string
Allowed values: start extend stop
dryRun
boolean
minutes
integer format: int64
<= 10080
until
string

OK

Media typeapplication/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
batteryFloor
required
integer format: int64
<= 95
from
required
string
keepDisplayOn
required
boolean
lidClosed
required
boolean
mode
required
string
Allowed values: off always hours
onlyOnPower
required
boolean
session
object
active
required
boolean
left
integer format: int64
until
string
status
required
object
error
string
lid
required
string
Allowed values: off active setup unavailable failed
lidError
string
power
object
hasBattery
required
boolean
onBattery
required
boolean
percent
required
integer format: int64
reason
string
Allowed values: container unsupported other power battery
session
required
boolean
state
required
string
Allowed values: off active waiting paused unavailable failed unknown
until
string
timezone
required
string
to
required
string

Example

{
"$schema": "https://example.com/api/schemas/KeepAwakeInfo.json",
"mode": "off",
"status": {
"lid": "off",
"reason": "container",
"state": "off"
}
}

Error

Media typeapplication/problem+json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"$schema": "https://example.com/api/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}