Skip to content

Allow keeping a closed laptop awake

POST
/api/v1/keep-awake/lid-setup
curl --request POST \
--url http://127.0.0.1:8484/api/v1/keep-awake/lid-setup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "dryRun": true }'

Owners only, on a Mac: shows the system’s administrator password dialog on the computer Exhale runs on, to allow it to turn lid sleep off (pmset disablesleep) without asking again. Someone must be at that computer. Elsewhere it only reports whether the lid can be held.

Media typeapplication/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
dryRun
boolean

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"
}