Skip to content

Keep this computer awake

POST
/api/v1/keep-awake
curl --request POST \
--url http://127.0.0.1:8484/api/v1/keep-awake \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "batteryFloor": 1, "dryRun": true, "from": "example", "keepDisplayOn": true, "lidClosed": true, "mode": "off", "onlyOnPower": true, "to": "example" }'

Owners only. Keeps the computer Exhale runs on from sleeping: mode off, always, or hours (from and to, HH:MM in the household time zone; to earlier than from crosses midnight). keepDisplayOn keeps the screen on too. lidClosed keeps a laptop awake with its lid closed (on a Mac, setup_lid_closed first). onlyOnPower: only while plugged in. batteryFloor: on battery, stop at this charge (default 20). To keep it awake now for a while, use keep_awake_session. Can be reverted with undo.

Media typeapplication/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
batteryFloor
integer format: int64
<= 95
dryRun
boolean
from
string
keepDisplayOn
boolean
lidClosed
boolean
mode
string
Allowed values: off always hours
onlyOnPower
boolean
to
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"
}