desks
GET
https://api.gaiadesk.net/v1 /desks Scope desks:readList the desks on the account and its team.
Every desk the caller's account or team has registered: online or not, its name, OS and version, when it was last seen, and for an offline desk since when and why (the reach log). Online desks first.
Code samples
cURL
curl -X GET "https://api.gaiadesk.net/v1/desks" \
-H "Authorization: Bearer $GAIADESK_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 The desks.
Example
{
"devices": [
{
"anytime": true,
"app_version": "string",
"desk_id": "string",
"last_failure": {
"at": 0,
"kind": "string",
"message": "string"
},
"last_ok": {
"at": 0,
"connect_ms": 0,
"route": "string",
"rtt_ms": 0
},
"last_seen": 0,
"name": "string",
"online": true,
"os": "string",
"owner": "string",
"probe": {
"connect_ms": 0,
"dialled": true,
"error": "string",
"hostname": "string",
"kind": "string",
"ok": true,
"os": "string",
"route": "string",
"rtt_ms": 0
},
"reachable": true,
"signal_idle_secs": 0,
"sources": [
"string"
],
"offline_since": 0,
"offline_reason": "string",
"offline_reason_text": "string",
"offline_detail": "string",
"features": [
"string"
],
"e2e_pub": "string",
"e2e_required": true
}
],
"identity": {
"account": "string",
"source": "string"
},
"notes": [
"string"
],
"sources": [
"string"
]
}Schema
devicesApiDesk[]requiredShow child parameters
anytimebooleanIts owner's app says it starts with the computer and works at the lock screen (
None: not said).app_versionstringThe GaiaDesk version it last registered with (the server's list only).
desk_idstringrequiredlast_failureReachFailureThe last one that failed, and why.
Show child parameters
atintegerrequiredkindstringrequiredA stable key: a [
crate::dial_stage::kind] or an error kind.messagestringrequiredOne line, as the CLI said it.
last_okReachSuccessThe last connect from this machine that worked (
cli_reach).Show child parameters
atintegerrequiredSeconds since the epoch.
connect_msintegerHow long the connect took, ms.
routestringrequiredLAN, Mesh, the GaiaDesk server.rtt_msintegerA data-plane round trip measured on it (
devices --probe), ms.last_seenintegerSeconds since the epoch.
namestringonlinebooleanrequiredosstringownerstringrequiredWhose desk: "you", a teammate's email, or unknown.
probeProbeResultShow child parameters
connect_msintegerdialledbooleanrequiredWhether it was dialled at all (no credential for it: not).
errorstringhostnamestringkindstringWhy not: a [
crate::dial_stage::kind], an error kind, agent_not_answering or no_credential.okbooleanrequiredConnected AND its agent answered a round trip.
osstringroutestringrtt_msintegerreachablebooleanReachable NOW: only with
--probe (else null).signal_idle_secsintegerSeconds since the server last heard the desk's socket (online desks, a server that says). Long silence on an "online" desk: a dead socket.
sourcesstring[]requiredWhere this desk was found: "account", "team", "lan" (seen on this network just now), "pinned" (paired over the LAN before, not seen on this network now), "mesh", "recent".
offline_sinceintegerUnix seconds it went offline (offline desks the reach log has a word on).
offline_reasonstringclosed, silent, error, updating, server-restart, id-changed, unknown.offline_reason_textstringoffline_detailstringid-changed: the id it answers to now (now 555000111).featuresstring[]What it takes now, while online:
desk_op (desk operations), desk_op_e2e (end-to-end encrypted ones).e2e_pubstringIts end-to-end X25519 public key (base64url, 32 bytes) while online and able to open sealed operations; null otherwise.
e2e_requiredbooleanIts owner requires end-to-end encryption for API commands (a plaintext one answers 409
e2e_required).identityobjectrequiredWho this machine is signed in as, and where that came from — the account whose desks the server listed.
Show child parameters
accountstringThe account's email (
null: not signed in, or the server could not say).sourcestringrequiredapp, login, token or none; from the hosted API (GET /v1/desks), api_key or session.notesstring[]requiredsourcesstring[]requiredWhich sources answered:
server, lan, mesh, recent.Headers
X-Request-IdstringThis request's id (
req_…), also in every error body. Quote it to support.RateLimit-LimitintegerRequests allowed per window for this key.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
401 No credential, or one that does not verify (
refused, unauthenticated).Example
{
"error": {
"desk": "string",
"kind": "string",
"message": "string",
"reason": "string",
"request_id": "string",
"status": 0
},
"e2e": {
"v": 0,
"events": [
{
"seq": 0,
"nonce": "string",
"ciphertext": "string"
}
]
}
}Schema
errorError & objectrequiredThe CLI's error object plus this request's id.
Show child parameters
deskstringThe desk it concerned, when there was one.
kindstringrequiredThe six kinds a program branches on. Stable: a new kind would be a breaking change, so match with a wildcard arm anyway.
messagestringrequiredreasonstringThe finer cause:
offline, unknown_desk, not_online, network, not_signed_in, timeout, local, …request_idstringrequiredstatusintegerOnly in a held body (
GaiaDesk-Held) — the HTTP status this failure would have had, had its 200 not been sent already.e2eobjectAn end-to-end encrypted operation's events; the last opens to the desk's real error (its
message here is a placeholder).Show child parameters
vintegerrequiredeventsApiE2eFrame[]requiredShow child parameters
seqintegerrequirednoncestringrequiredciphertextstringrequired429 Over this key's rate limit (
refused, rate_limited).Same as 401 · GET /desks
Headers
Retry-AfterintegerSeconds to wait before trying again.
RateLimit-LimitintegerRequests allowed per window for this key.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
GET
https://api.gaiadesk.net/v1 /desks/{id} Scope desks:readOne desk, with its reachability and wake hints.
Parameters
idstringpathrequiredThe desk's nine-digit id.
Code samples
cURL
curl -X GET "https://api.gaiadesk.net/v1/desks/{id}" \
-H "Authorization: Bearer $GAIADESK_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 The desk.
Example
{
"anytime": true,
"app_version": "string",
"desk_id": "string",
"last_failure": {
"at": 0,
"kind": "string",
"message": "string"
},
"last_ok": {
"at": 0,
"connect_ms": 0,
"route": "string",
"rtt_ms": 0
},
"last_seen": 0,
"name": "string",
"online": true,
"os": "string",
"owner": "string",
"probe": {
"connect_ms": 0,
"dialled": true,
"error": "string",
"hostname": "string",
"kind": "string",
"ok": true,
"os": "string",
"route": "string",
"rtt_ms": 0
},
"reachable": true,
"signal_idle_secs": 0,
"sources": [
"string"
],
"offline_since": 0,
"offline_reason": "string",
"offline_reason_text": "string",
"offline_detail": "string",
"features": [
"string"
],
"e2e_pub": "string",
"e2e_required": true,
"wake": {
"doorbell_sockets": 0,
"lan_wake": true
}
}Schema
anytimebooleanIts owner's app says it starts with the computer and works at the lock screen (
None: not said).app_versionstringThe GaiaDesk version it last registered with (the server's list only).
desk_idstringrequiredlast_failureReachFailureThe last one that failed, and why.
Show child parameters
atintegerrequiredkindstringrequiredA stable key: a [
crate::dial_stage::kind] or an error kind.messagestringrequiredOne line, as the CLI said it.
last_okReachSuccessThe last connect from this machine that worked (
cli_reach).Show child parameters
atintegerrequiredSeconds since the epoch.
connect_msintegerHow long the connect took, ms.
routestringrequiredLAN, Mesh, the GaiaDesk server.rtt_msintegerA data-plane round trip measured on it (
devices --probe), ms.last_seenintegerSeconds since the epoch.
namestringonlinebooleanrequiredosstringownerstringrequiredWhose desk: "you", a teammate's email, or unknown.
probeProbeResultShow child parameters
connect_msintegerdialledbooleanrequiredWhether it was dialled at all (no credential for it: not).
errorstringhostnamestringkindstringWhy not: a [
crate::dial_stage::kind], an error kind, agent_not_answering or no_credential.okbooleanrequiredConnected AND its agent answered a round trip.
osstringroutestringrtt_msintegerreachablebooleanReachable NOW: only with
--probe (else null).signal_idle_secsintegerSeconds since the server last heard the desk's socket (online desks, a server that says). Long silence on an "online" desk: a dead socket.
sourcesstring[]requiredWhere this desk was found: "account", "team", "lan" (seen on this network just now), "pinned" (paired over the LAN before, not seen on this network now), "mesh", "recent".
offline_sinceintegerUnix seconds it went offline (offline desks the reach log has a word on).
offline_reasonstringclosed, silent, error, updating, server-restart, id-changed, unknown.offline_reason_textstringoffline_detailstringid-changed: the id it answers to now (now 555000111).featuresstring[]What it takes now, while online:
desk_op (desk operations), desk_op_e2e (end-to-end encrypted ones).e2e_pubstringIts end-to-end X25519 public key (base64url, 32 bytes) while online and able to open sealed operations; null otherwise.
e2e_requiredbooleanIts owner requires end-to-end encryption for API commands (a plaintext one answers 409
e2e_required).wakeobjectrequiredHow this desk could be woken now.
Show child parameters
doorbell_socketsintegerrequiredDoorbell sockets the desk holds on the wake listener (a sleeping Mac's).
lan_wakebooleanrequiredThe desk said how it can be woken on its LAN (Wake-on-LAN by an awake sibling).
Headers
X-Request-IdstringThis request's id (
req_…), also in every error body. Quote it to support.404 No such desk or resource visible to the caller (
unreachable, unknown_desk).Same as 401 · GET /desks
429 Over this key's rate limit (
refused, rate_limited).Same as 401 · GET /desks
Headers
Retry-AfterintegerSeconds to wait before trying again.
RateLimit-LimitintegerRequests allowed per window for this key.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
GET
https://api.gaiadesk.net/v1 /desks/{id}/reach Scope desks:readThe desk's online and offline history (the reach log, 30 days).
Parameters
idstringpathrequiredThe desk's nine-digit id.
sinceintegerqueryUnix seconds. Default seven days ago; the log keeps thirty.
limitintegerqueryAt most this many transitions, newest first (default 200, at most 1000).
Code samples
cURL
curl -X GET "https://api.gaiadesk.net/v1/desks/{id}/reach" \
-H "Authorization: Bearer $GAIADESK_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 The transitions, newest first.
Example
{
"desk_id": "string",
"since": 0,
"events": [
{
"at": 0,
"online": true,
"reason": "string",
"reason_text": "string",
"detail": "string",
"version": "string"
}
]
}Schema
desk_idstringrequiredsinceintegerrequiredeventsApiReachEvent[]requiredShow child parameters
atintegerrequiredonlinebooleanrequiredreasonstringrequiredreason_textstringrequireddetailstringversionstringHeaders
X-Request-IdstringThis request's id (
req_…), also in every error body. Quote it to support.404 No such desk or resource visible to the caller (
unreachable, unknown_desk).Same as 401 · GET /desks
429 Over this key's rate limit (
refused, rate_limited).Same as 401 · GET /desks
Headers
Retry-AfterintegerSeconds to wait before trying again.
RateLimit-LimitintegerRequests allowed per window for this key.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
Updated