desk-ops
https://api.gaiadesk.net/v1 /desks/{id}/stats Scope desks:readCPU, memory, disks and running jobs, as the desk measures them.
Parameters
idstringpathrequiredGaiaDesk-E2EstringheaderApiE2eRequest, as base64url of its JSON) in place of a plaintext body or parameters. The answer is then sealed too (ApiE2eAnswer, ApiE2eStreamEvent, ApiE2eFrame). A POST may instead send the body {"e2e": …} (ApiE2eBody). See the "End-to-end encryption" section of docs/api/README.md.wake_sintegerqueryCode samples
cURL
curl -X GET "https://api.gaiadesk.net/v1/desks/{id}/stats" \
-H "Authorization: Bearer $GAIADESK_API_KEY" \
-H "GaiaDesk-E2E: <value>"TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{
"cpu_percent": 0,
"cpus": 0,
"desk": "string",
"disks": [],
"hostname": "string",
"jobs_running": 0,
"last_reboot_utc": "string",
"load": [
0
],
"logged_user": "string",
"mem_free_mb": 0,
"mem_total_mb": 0,
"os": "string",
"os_version": "",
"uptime_secs": 0
}StatsReport
cpu_percentnumberrequiredcpusintegerrequireddeskstringrequireddisksDiskStat[]Show child parameters
free_mbintegerrequiredmountstringrequired/, C:\\).total_mbintegerrequiredhostnamestringrequiredjobs_runningintegerrequiredgaiadesk-cli run --detach) running now.last_reboot_utcstringloadarrayNone where the OS has none (Windows).logged_userstringmem_free_mbintegerrequiredmem_total_mbintegerrequiredosstringrequiredmacos, windows, linux (std::env::consts::OS).os_versionstringmacOS 15.1, Windows 11 (26100)).uptime_secsintegerrequired{
"cpu_percent": 0,
"cpus": 0,
"desk": "string",
"disks": [],
"hostname": "string",
"jobs_running": 0,
"last_reboot_utc": "string",
"load": [
0
],
"logged_user": "string",
"mem_free_mb": 0,
"mem_total_mb": 0,
"os": "string",
"os_version": "",
"uptime_secs": 0
}ApiE2eAnswer
e2eobjectrequiredShow child parameters
vintegerrequiredeventsApiE2eFrame[]requiredShow child parameters
seqintegerrequirednoncestringrequiredciphertextstringrequired{
"e2e": {
"v": 0,
"events": [
{
"seq": 0,
"nonce": "string",
"ciphertext": "string"
}
]
}
}X-Request-Idstringreq_…), also in every error body. Quote it to support.RateLimit-LimitintegerRateLimit-RemainingintegerRateLimit-Resetintegerusage).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 & objectrequiredShow child parameters
deskstringkindstringrequiredmessagestringrequiredreasonstringoffline, unknown_desk, not_online, network, not_signed_in, timeout, local, …request_idstringrequiredstatusintegerGaiaDesk-Held) — the HTTP status this failure would have had, had its 200 not been sent already.e2eobjectmessage here is a placeholder).Show child parameters
vintegerrequiredeventsApiE2eFrame[]requiredShow child parameters
seqintegerrequirednoncestringrequiredciphertextstringrequiredrefused, unauthenticated).Same as 400 · GET /desks/{id}/stats
refused).Same as 400 · GET /desks/{id}/stats
unreachable, unknown_desk).Same as 400 · GET /desks/{id}/stats
unreachable, with the reach log's reason: silent, closed, …) or could not be woken within wake_s; or it runs a GaiaDesk from before desk operations (protocol, desk_too_old: update GaiaDesk on this desk).Same as 400 · GET /desks/{id}/stats
rate_limited), or the desk already runs 16 API operations (desk_busy).Same as 400 · GET /desks/{id}/stats
Retry-Afterintegerconnection_lost), or answered something this server cannot read (protocol).Same as 400 · GET /desks/{id}/stats
unreachable, desk_ops_disabled).Same as 400 · GET /desks/{id}/stats
https://api.gaiadesk.net/v1 /desks/{id}/files Scope filesDownload a file (the same 256 MB cap).
The file's bytes. A folder answers 400 is_folder; a file larger than 256 MB, 400 too_large. A failure after the first byte breaks the transfer (the connection is reset, never a clean short file) and is the outcome the call's audit event records.
Parameters
idstringpathrequiredpathstringqueryGaiaDesk-E2E), where it is inside the sealed request and left out here.GaiaDesk-E2EstringheaderApiE2eRequest, as base64url of its JSON) in place of a plaintext body or parameters. The answer is then sealed too (ApiE2eAnswer, ApiE2eStreamEvent, ApiE2eFrame). A POST may instead send the body {"e2e": …} (ApiE2eBody). See the "End-to-end encryption" section of docs/api/README.md.wake_sintegerqueryCode samples
cURL
curl -X GET "https://api.gaiadesk.net/v1/desks/{id}/files" \
-H "Authorization: Bearer $GAIADESK_API_KEY" \
-H "GaiaDesk-E2E: <value>"TypeScript
Python
Go
PHP
Ruby
Java
Responses
application/octet-stream"string"
application/x-ndjson{
"seq": 0,
"nonce": "string",
"ciphertext": "string"
}X-Request-Idstringreq_…), also in every error body. Quote it to support.RateLimit-LimitintegerRateLimit-RemainingintegerRateLimit-Resetintegerrefused, unauthenticated).Same as 400 · GET /desks/{id}/stats
refused).Same as 400 · GET /desks/{id}/stats
unreachable, unknown_desk).Same as 400 · GET /desks/{id}/stats
unreachable, with the reach log's reason: silent, closed, …) or could not be woken within wake_s; or it runs a GaiaDesk from before desk operations (protocol, desk_too_old: update GaiaDesk on this desk).Same as 400 · GET /desks/{id}/stats
rate_limited), or the desk already runs 16 API operations (desk_busy).Same as 400 · GET /desks/{id}/stats
Retry-Afterintegerconnection_lost), or answered something this server cannot read (protocol).Same as 400 · GET /desks/{id}/stats
unreachable, desk_ops_disabled).Same as 400 · GET /desks/{id}/stats
https://api.gaiadesk.net/v1 /desks/{id}/files Scope filesUpload a file (streamed; at most 256 MB through the API, larger goes direct).
The body is the file's bytes. path names the file it becomes; a path that names an existing folder receives it under that folder's last name component. Larger than 256 MB answers 413 too_large.
Parameters
idstringpathrequiredpathstringqueryGaiaDesk-E2E), where it is inside the sealed request and left out here.GaiaDesk-E2EstringheaderApiE2eRequest, as base64url of its JSON) in place of a plaintext body or parameters. The answer is then sealed too (ApiE2eAnswer, ApiE2eStreamEvent, ApiE2eFrame). A POST may instead send the body {"e2e": …} (ApiE2eBody). See the "End-to-end encryption" section of docs/api/README.md.wake_sintegerqueryRequest body
application/octet-stream
"string"
Code samples
cURL
curl -X PUT "https://api.gaiadesk.net/v1/desks/{id}/files" \
-H "Authorization: Bearer $GAIADESK_API_KEY" \
-H "GaiaDesk-E2E: <value>" \
-H "Content-Type: application/octet-stream" \
-d '"string"'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{
"bytes": 0,
"desk": "string",
"destination": "string",
"direction": "string",
"dirs": 0,
"failed": [
{
"message": "string",
"path": "string"
}
],
"files": 0,
"resumed_bytes": 0,
"seconds": 0
}CopyResult
bytesintegerrequireddeskstringrequireddestinationstringrequireddirectionstringrequireddirsintegerrequiredfailedCopyFailure[]requiredShow child parameters
messagestringrequiredpathstringrequiredfilesintegerrequiredresumed_bytesintegerrequiredsecondsnumberrequired{
"bytes": 0,
"desk": "string",
"destination": "string",
"direction": "string",
"dirs": 0,
"failed": [
{
"message": "string",
"path": "string"
}
],
"files": 0,
"resumed_bytes": 0,
"seconds": 0
}ApiE2eAnswer
e2eobjectrequiredShow child parameters
vintegerrequiredeventsApiE2eFrame[]requiredShow child parameters
seqintegerrequirednoncestringrequiredciphertextstringrequired{
"e2e": {
"v": 0,
"events": [
{
"seq": 0,
"nonce": "string",
"ciphertext": "string"
}
]
}
}X-Request-Idstringreq_…), also in every error body. Quote it to support.RateLimit-LimitintegerRateLimit-RemainingintegerRateLimit-Resetintegerrefused, unauthenticated).Same as 400 · GET /desks/{id}/stats
refused).Same as 400 · GET /desks/{id}/stats
unreachable, unknown_desk).Same as 400 · GET /desks/{id}/stats
unreachable, with the reach log's reason: silent, closed, …) or could not be woken within wake_s; or it runs a GaiaDesk from before desk operations (protocol, desk_too_old: update GaiaDesk on this desk).Same as 400 · GET /desks/{id}/stats
usage, too_large).Same as 400 · GET /desks/{id}/stats
rate_limited), or the desk already runs 16 API operations (desk_busy).Same as 400 · GET /desks/{id}/stats
Retry-Afterintegerconnection_lost), or answered something this server cannot read (protocol).Same as 400 · GET /desks/{id}/stats
unreachable, desk_ops_disabled).Same as 400 · GET /desks/{id}/stats