#[non_exhaustive]pub struct StatusResponse {
pub applications: Option<HashMap<String, TargetResponse>>,
pub backup_now: Vec<String>,
pub check_severities: HashMap<String, CheckSeverity>,
pub machine: Option<TargetResponse>,
pub names: Entitlements,
pub tags: TagMap,
}Expand description
The status-push response: only the return-path instructions the device can act on. The stored status record is deliberately not echoed back — the device already has everything it sent.
JSON schema
{
"description": "The status-push response: only the return-path instructions the device\ncan act on. The stored status record is deliberately not echoed back —\nthe device already has everything it sent.",
"type": "object",
"required": [
"backup_now",
"check_severities",
"names",
"tags"
],
"properties": {
"applications": {
"description": "Canopy's answer about each application the push described, keyed by the\nkey the reporter named it with. Present only for a push in the current\nformat.\n\nA key Canopy holds no application for is absent rather than empty,\nwhich is what a source whose pushes are ignored sees: nothing was\ncreated for it to be told about.",
"type": [
"object",
"null"
],
"additionalProperties": {
"$ref": "#/components/schemas/TargetResponse"
},
"propertyNames": {
"type": "string"
}
},
"backup_now": {
"description": "Backup types the server should back up now: operator-requested\none-offs plus scheduled backups that are due. Each serializes as a\nplain string (e.g. `\"tamanu-postgres\"`). The device should run each\nlisted type, then report via `POST /backup-report`; an empty list\nmeans nothing to do. Only sent to `alertd` pushes (the agent that\nruns backups); other sources always receive an empty list.",
"type": "array",
"items": {
"type": "string"
}
},
"check_severities": {
"description": "The effective handling of every healthcheck canopy knows about, keyed\nby check name (as reported in `health[].check`): `skip` (silenced for\nthis server, or classified below warning), `warn` (warning), or `fail`\n(error or critical). Only the static severity baseline is reflected —\noperator-defined conditional rules are evaluated per push and not\nincluded. Checks absent from the map are new to canopy and default to\n`warn`. Clients that predate this field can safely ignore it; the\nsame mapping is served on demand at `GET /status/{server_id}/check-severities`.",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/CheckSeverity"
},
"propertyNames": {
"type": "string"
}
},
"machine": {
"oneOf": [
{
"type": "null"
},
{
"description": "Canopy's answer about the machine. Present only for a push in the\ncurrent format: a transitional unified push is answered by the flat\nfields above and nothing else, so the response a fielded reporter sees\nis the one it already saw.",
"$ref": "#/components/schemas/TargetResponse"
}
]
},
"names": {
"description": "What this server is entitled to do with names: the domains its group\ncontrols, the grants it holds, whether it is paused, and the names and\ncertificates it already has. A server-wide fact, so returned to every\nsource — an agent already reporting status learns of a new domain or a\nnewly granted permission without asking separately. Identical to what\n`GET /names/entitlements` returns. Clients that predate this field can\nsafely ignore it.",
"$ref": "#/components/schemas/Entitlements"
},
"tags": {
"description": "The server's effective tags: its own tags overlaid on its group's,\nplus the synthetic read-only `canopy:` tags and effective `billing.*`\nlabels. Identical to what the standalone `GET /tags` endpoint\nreturns — see that endpoint for the full contract. Clients that\npredate this field can safely ignore it.\n\nOn a push in the current format this is the machine's, the push being\nthe machine's; each application's own are under `applications`.",
"$ref": "#/components/schemas/TagMap"
}
}
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.applications: Option<HashMap<String, TargetResponse>>Canopy’s answer about each application the push described, keyed by the key the reporter named it with. Present only for a push in the current format.
A key Canopy holds no application for is absent rather than empty, which is what a source whose pushes are ignored sees: nothing was created for it to be told about.
backup_now: Vec<String>Backup types the server should back up now: operator-requested
one-offs plus scheduled backups that are due. Each serializes as a
plain string (e.g. "tamanu-postgres"). The device should run each
listed type, then report via POST /backup-report; an empty list
means nothing to do. Only sent to alertd pushes (the agent that
runs backups); other sources always receive an empty list.
check_severities: HashMap<String, CheckSeverity>The effective handling of every healthcheck canopy knows about, keyed
by check name (as reported in health[].check): skip (silenced for
this server, or classified below warning), warn (warning), or fail
(error or critical). Only the static severity baseline is reflected —
operator-defined conditional rules are evaluated per push and not
included. Checks absent from the map are new to canopy and default to
warn. Clients that predate this field can safely ignore it; the
same mapping is served on demand at GET /status/{server_id}/check-severities.
machine: Option<TargetResponse>§names: EntitlementsWhat this server is entitled to do with names: the domains its group
controls, the grants it holds, whether it is paused, and the names and
certificates it already has. A server-wide fact, so returned to every
source — an agent already reporting status learns of a new domain or a
newly granted permission without asking separately. Identical to what
GET /names/entitlements returns. Clients that predate this field can
safely ignore it.
The server’s effective tags: its own tags overlaid on its group’s,
plus the synthetic read-only canopy: tags and effective billing.*
labels. Identical to what the standalone GET /tags endpoint
returns — see that endpoint for the full contract. Clients that
predate this field can safely ignore it.
On a push in the current format this is the machine’s, the push being
the machine’s; each application’s own are under applications.
Implementations§
Source§impl StatusResponse
impl StatusResponse
Sourcepub fn builder() -> StatusResponseBuilder
pub fn builder() -> StatusResponseBuilder
Create an instance of StatusResponse using the builder syntax
Trait Implementations§
Source§impl Clone for StatusResponse
impl Clone for StatusResponse
Source§fn clone(&self) -> StatusResponse
fn clone(&self) -> StatusResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more