webhook-events
WEBHOOK
desk.onlineA desk came online (its signaling socket registered).
Parameters
GaiaDesk-Signaturestringheaderrequiredt=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" keyed with the webhook secret>. Reject a delivery whose t is more than five minutes off, and de-duplicate by the event id.Payload
application/json
One delivery. id is stable across retries; de-duplicate by it.
idstringrequiredtypestringrequiredcreatedintegerrequireddataobjectrequiredShow child parameters
deskobjectrequiredShow child parameters
desk_idstringrequiredownerstringrequiredreasonstringrequiredreason_textstringrequiredversionstringwoke_after_msintegerdesk.woke: how long after the ring it came online.{
"id": "string",
"type": "desk.online",
"created": 0,
"data": {
"desk": {
"desk_id": "string",
"owner": "string",
"reason": "string",
"reason_text": "string",
"version": "string",
"woke_after_ms": 0
}
}
}Responses
200 Any 2xx acknowledges the delivery; anything else is retried with backoff for 24 hours.
WEBHOOK
desk.offlineA desk went offline, with the reason (the reach log's).
Parameters
GaiaDesk-Signaturestringheaderrequiredt=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" keyed with the webhook secret>. Reject a delivery whose t is more than five minutes off, and de-duplicate by the event id.Payload
application/json
One delivery. id is stable across retries; de-duplicate by it.
idstringrequiredtypestringrequiredcreatedintegerrequireddataobjectrequiredShow child parameters
deskobjectrequiredShow child parameters
desk_idstringrequiredownerstringrequiredreasonstringrequiredreason_textstringrequiredversionstringwoke_after_msintegerdesk.woke: how long after the ring it came online.{
"id": "string",
"type": "desk.online",
"created": 0,
"data": {
"desk": {
"desk_id": "string",
"owner": "string",
"reason": "string",
"reason_text": "string",
"version": "string",
"woke_after_ms": 0
}
}
}Responses
200 Any 2xx acknowledges the delivery.
WEBHOOK
desk.wokeA desk rung through the API came online within three minutes.
Parameters
GaiaDesk-Signaturestringheaderrequiredt=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" keyed with the webhook secret>. Reject a delivery whose t is more than five minutes off, and de-duplicate by the event id.Payload
application/json
One delivery. id is stable across retries; de-duplicate by it.
idstringrequiredtypestringrequiredcreatedintegerrequireddataobjectrequiredShow child parameters
deskobjectrequiredShow child parameters
desk_idstringrequiredownerstringrequiredreasonstringrequiredreason_textstringrequiredversionstringwoke_after_msintegerdesk.woke: how long after the ring it came online.{
"id": "string",
"type": "desk.online",
"created": 0,
"data": {
"desk": {
"desk_id": "string",
"owner": "string",
"reason": "string",
"reason_text": "string",
"version": "string",
"woke_after_ms": 0
}
}
}Responses
200 Any 2xx acknowledges the delivery.
WEBHOOK
job.finishedA background job started through the API ended (exited, killed, or lost).
Parameters
GaiaDesk-Signaturestringheaderrequiredt=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" keyed with the webhook secret>. Reject a delivery whose t is more than five minutes off, and de-duplicate by the event id.Payload
application/json
job.finished: a background job started through the API ended. id is stable across retries.
idstringrequiredtyperequiredcreatedintegerrequireddataobjectrequiredShow child parameters
deskobjectrequiredShow child parameters
desk_idstringrequiredownerstringrequiredjobobjectrequiredA background job on a desk.
Show child parameters
bystringWho started it: the token's name, or
owner for a person.commandstringrequiredended_at_msintegerenforcementstring[]How the desk enforces them, one line each, in its own words — and what it could not do here (e.g. "cgroups v2 not available: …").
exit_codeintegerlimitsJobLimitsThe caps and keep-awake it runs under, as the desk applied them (
keep_awake resolved against the desk's default). None from a desk before job limits, and for a job started with none.log_bytesintegerBytes of output kept (current log plus its one rotated predecessor).
max_runningintegerThe desk's limit on jobs running at once; a job past it waits in state
queued. Absent from a desk before queueing.namestringrequiredpidintegerqueue_positioninteger1-based place in the queue while
state is queued.reasonstringWhy it ended as it did, as a machine reads it, when the desk knows:
blocked_by_os_policy — Windows Smart App Control or WDAC refused to start a program it ran (its state then says so in words); machine_rebooted — lost because the desk's machine restarted while it ran (ended_at_ms is the boot); dropped_on_reboot — lost while queued: a restart came before its turn and its start was not kept (it had secret files).started_at_msintegerrequiredstatestringrequiredqueued (waiting for a free slot), running, exited, killed, or lost (its process is gone and how it ended was never recorded; reason says when a machine restart did it).{
"id": "string",
"type": {},
"created": 0,
"data": {
"desk": {
"desk_id": "string",
"owner": "string"
},
"job": {
"by": "",
"command": "string",
"ended_at_ms": 0,
"enforcement": [
"string"
],
"exit_code": 0,
"limits": {
"cpu_percent": 0,
"keep_awake": true,
"max_runtime_secs": 0,
"mem_mb": 0,
"priority": "string"
},
"log_bytes": 0,
"max_running": 0,
"name": "string",
"pid": 0,
"queue_position": 0,
"reason": "string",
"started_at_ms": 0,
"state": "string"
}
}
}Responses
200 Any 2xx acknowledges the delivery.
WEBHOOK
desk.healthA desk's report crossed one of its health thresholds (disk free, swap, load, critical memory pressure). Once per desk and condition per 6 hours.
Parameters
GaiaDesk-Signaturestringheaderrequiredt=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" keyed with the webhook secret>. Reject a delivery whose t is more than five minutes off, and de-duplicate by the event id.Payload
application/json
desk.health: a desk's report crossed a threshold (GET/PUT /api/desks/{id}/health, gaiadesk-cli health set; defaults disk under 10% free, swap over 75% used, 5-minute load over 2 per CPU; macOS critical memory pressure always counts). One event per condition, at most once per desk and condition per 6 hours. id is stable across retries.
idstringrequiredtyperequiredcreatedintegerrequireddataobjectrequiredShow child parameters
deskobjectrequiredShow child parameters
desk_idstringrequiredownerstringrequiredwarningobjectrequiredShow child parameters
kindstringrequiredtextstringrequiredreportobjectrequiredThe desk's figures; any may be absent (the OS would not say; no load average on Windows).
Show child parameters
disk_free_pctnumberdisk_mountstringswap_used_mbintegerswap_total_mbintegerload_per_cpunumbermem_pressurestring{
"id": "string",
"type": {},
"created": 0,
"data": {
"desk": {
"desk_id": "string",
"owner": "string"
},
"warning": {
"kind": "disk_low",
"text": "string"
},
"report": {
"disk_free_pct": 0,
"disk_mount": "string",
"swap_used_mb": 0,
"swap_total_mb": 0,
"load_per_cpu": 0,
"mem_pressure": "normal"
}
}
}Responses
200 Any 2xx acknowledges the delivery.
Updated