{
"$defs": {
"BudgetSource": {
"description": "Where the media budget's egress comes from.",
"oneOf": [
{
"const": "engine",
"description": "The engine's `stats` events.",
"type": "string"
},
{
"const": "estimate",
"description": "Sew's forwarding estimate (stats missing or stale).",
"type": "string"
}
]
},
"MailTls": {
"description": "How the SMTP connection is secured (`[mail.smtp] tls`).",
"oneOf": [
{
"const": "none",
"description": "Plain SMTP; loopback relays only.",
"type": "string"
},
{
"const": "starttls",
"description": "STARTTLS, required.",
"type": "string"
},
{
"const": "tls",
"description": "Implicit TLS.",
"type": "string"
}
]
},
"MediaPathState": {
"description": "The media path's state.",
"oneOf": [
{
"const": "up",
"description": "Calls work (Sew's state after every start).",
"type": "string"
},
{
"const": "down",
"description": "Voice is unavailable: joins and moves refused, live calls ended.",
"type": "string"
}
]
},
"MediaTier": {
"description": "The media budget tier.",
"oneOf": [
{
"const": "normal",
"description": "Everything allowed; full hints.",
"type": "string"
},
{
"const": "constrained",
"description": "New camera leases refused; lower hints.",
"type": "string"
},
{
"const": "critical",
"description": "New camera and screen leases refused; lowest hints.",
"type": "string"
}
]
},
"ProviderKind": {
"description": "The install's identity provider.",
"oneOf": [
{
"const": "k2",
"description": "K2 grants create accounts; K2 signs the pass.",
"type": "string"
},
{
"const": "standalone",
"description": "Local users and passwords.",
"type": "string"
},
{
"const": "link",
"description": "A meeting-link session (session provider 3, made by redeeming a\nmeeting link). Never an install's provider.",
"type": "string"
}
]
},
"RunState": {
"description": "A preview's or run's state.",
"oneOf": [
{
"const": "running",
"description": "Working.",
"type": "string"
},
{
"const": "done",
"description": "Finished.",
"type": "string"
},
{
"const": "failed",
"description": "Gave up (a later run starts over).",
"type": "string"
}
]
},
"SearchState": {
"description": "Search index state.",
"oneOf": [
{
"const": "ready",
"description": "Queries use the live index.",
"type": "string"
},
{
"const": "missing",
"description": "No usable index; a rebuild runs and searches answer `503 search_rebuilding`.",
"type": "string"
}
]
},
"StatusAlarm": {
"description": "A status alarm. K2 shows each one verbatim.",
"oneOf": [
{
"const": "db_down",
"description": "`db.ok = false`.",
"type": "string"
},
{
"const": "jobs_dead",
"description": "`jobs.dead > 0`.",
"type": "string"
},
{
"const": "keys_provider_down",
"description": "`keys.provider_ok = false`.",
"type": "string"
},
{
"const": "keys_current_month_missing",
"description": "`keys.current_month_ready = false`.",
"type": "string"
},
{
"const": "keys_mirror_stale",
"description": "The keyring mirror is stale (or kind `none`).",
"type": "string"
},
{
"const": "keys_shred_pending",
"description": "A crypto-shred started but did not finish.",
"type": "string"
},
{
"const": "keys_resurrected",
"description": "Old key files for shredded key ids were found and refused.",
"type": "string"
},
{
"const": "keys_rewrap_stalled",
"description": "Keys wait for a re-wrap but no retiring KEK is loaded.",
"type": "string"
},
{
"const": "search_lagging",
"description": "Search indexing trails writes by more than 60 s.",
"type": "string"
},
{
"const": "search_unavailable",
"description": "The search index is missing and being rebuilt; searches answer 503.",
"type": "string"
},
{
"const": "search_commit_failing",
"description": "Three search index commits in a row failed.",
"type": "string"
},
{
"const": "search_disk_low",
"description": "Free disk under the search index is below its size plus 1 GiB.",
"type": "string"
},
{
"const": "backup_stale",
"description": "The last good backup is older than 36 h (set by the backup engine).",
"type": "string"
},
{
"const": "backup_failed",
"description": "The last backup failed (set by the backup engine).",
"type": "string"
},
{
"const": "drill_failed",
"description": "The last restore drill failed (set by the backup engine).",
"type": "string"
},
{
"const": "drill_stale",
"description": "The last good restore drill is older than 8 days (set by the backup engine).",
"type": "string"
},
{
"const": "gifs_unconfigured",
"description": "GIF search is on but its provider key does not resolve or was refused.",
"type": "string"
},
{
"const": "retention_overdue",
"description": "A finite retention policy is set and no run finished `done` for 48 h.",
"type": "string"
},
{
"const": "retention_search_backlog",
"description": "Purged messages' search documents are still waiting after 24 h.",
"type": "string"
},
{
"const": "mail_failing",
"description": "Three or more mail sends in a row failed over at least 10 minutes.",
"type": "string"
},
{
"const": "digest_mail_unconfigured",
"description": "`digest.enabled` is on but `[mail.smtp]` is not configured.",
"type": "string"
},
{
"const": "export_stuck",
"description": "A running export wrote no progress for 10 minutes.",
"type": "string"
},
{
"const": "erase_stuck",
"description": "A running account erasure made no progress for 10 minutes (its job is lost, overdue\nor has failed for that long; a wait for an active recording is not stuck).",
"type": "string"
},
{
"const": "voice_media_down",
"description": "Voice is enabled and the media engine has been unreachable for more than 60 s.",
"type": "string"
},
{
"const": "voice_drift",
"description": "The snapshot audit found voice state Sew did not expect.",
"type": "string"
},
{
"const": "media_panic",
"description": "The media engine reported a panic in the last hour.",
"type": "string"
},
{
"const": "e2ee_group_resets",
"description": "More than 3 call key group resets install-wide in the last hour, or a call in reset\nback-off.",
"type": "string"
},
{
"const": "e2ee_removal_overdue",
"description": "A key removal was not activated by its hard bound in the last hour.",
"type": "string"
},
{
"const": "e2ee_rebuild_failed",
"description": "A key group rebuild ended in a new group or a reset in the last hour.",
"type": "string"
},
{
"const": "e2ee_roster_mismatch",
"description": "A client reported a roster mismatch in the last hour.",
"type": "string"
},
{
"const": "e2ee_sender_stale",
"description": "A stale-slot resync or a `peer_undecryptable` quorum in the last hour.",
"type": "string"
},
{
"const": "e2ee_engine_anomaly",
"description": "A client's bridge reported a misbehaving engine in the last hour.",
"type": "string"
},
{
"const": "e2ee_keys_unavailable",
"description": "Voice is enabled and the call DS or CA key failed to load.",
"type": "string"
},
{
"const": "media_budget_critical",
"description": "The media budget tier has been `critical` for more than 5 min;\nclears when the tier drops.",
"type": "string"
},
{
"const": "recorder_down",
"description": "The recorder failed health for 60 s.",
"type": "string"
},
{
"const": "transcriber_down",
"description": "The transcriber failed health for 60 s.",
"type": "string"
},
{
"const": "transcribe_backlog",
"description": "The oldest untranscribed segment is older than 30 min.",
"type": "string"
},
{
"const": "recording_storage_full",
"description": "A recording stopped on `storage_full` in the last 24 h.",
"type": "string"
},
{
"const": "recording_auto_failed",
"description": "Three auto-starts failed in 10 min for one channel.",
"type": "string"
},
{
"const": "recording_consent_violation",
"description": "A segment of an ungranted identity reached `sew` in the last 24 h.",
"type": "string"
},
{
"const": "recording_required_failed",
"description": "A room that must record every call with two or more people could not: three\nrequired starts failed in 10 min for one channel, or recording is required where it\ncannot run (the recorder is not installed, `recording.enabled` is off, or the\ngoverning App has `uploads: false`) in the last hour.",
"type": "string"
},
{
"const": "keys_mirror_unmounted",
"description": "The `dir` keyring mirror path is not mounted: it is missing, or a plain directory\nthat holds no mirror of this install. Nothing is written there; key writes wait.",
"type": "string"
},
{
"const": "keys_mirror_same_device",
"description": "The `dir` keyring mirror path is on the keyring's own filesystem. Nothing is\nwritten there; key writes wait.",
"type": "string"
},
{
"const": "keys_mirror_unsynced",
"description": "No full keyring mirror reconcile has succeeded since the server started (it runs\none at start), so the mirror is not known to hold every key; `keys.mirror_ok` is\n`false` meanwhile.",
"type": "string"
}
]
},
"StatusBackup": {
"description": "Backup state in `status`. The backup engine fills it; absent until then.",
"properties": {
"age_ms": {
"description": "Age of the last good backup.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"last_error": {
"description": "Why the last run failed, if it did (cleared by the next good one).",
"type": [
"string",
"null"
]
},
"last_error_at": {
"description": "When the last failed run failed (additive).",
"format": "date-time",
"type": [
"string",
"null"
]
},
"last_id": {
"description": "The last good backup's bundle id.",
"type": [
"string",
"null"
]
},
"last_kind": {
"description": "The last good backup's kind (`scheduled`, `manual`, …; additive).",
"type": [
"string",
"null"
]
},
"last_ok_at": {
"description": "The last good backup.",
"format": "date-time",
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"StatusDb": {
"description": "Database status.",
"properties": {
"lag_ms": {
"description": "Replica lag; absent in v1 (single node).",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"ok": {
"description": "Whether the database answers (`SELECT 1` within 1 s).",
"type": "boolean"
},
"ping_ms": {
"description": "Round trip of the `SELECT 1` probe; absent when it failed (additive).",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"ok"
],
"type": "object"
},
"StatusDigest": {
"description": "The email digest in `status`.",
"properties": {
"enabled": {
"description": "Org policy `digest.enabled`.",
"type": "boolean"
},
"pending_jobs": {
"description": "Queued `email_digest` jobs.",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"enabled",
"pending_jobs"
],
"type": "object"
},
"StatusDrill": {
"description": "Restore-drill state in `status`. The backup engine fills it; absent until then.",
"properties": {
"age_ms": {
"description": "Age of the last good drill (additive).",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"last_error": {
"description": "Why the last drill failed, if it did.",
"type": [
"string",
"null"
]
},
"last_ok": {
"description": "Whether the last drill passed.",
"type": [
"boolean",
"null"
]
},
"last_ok_at": {
"description": "The last good drill.",
"format": "date-time",
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"StatusErasures": {
"description": "`status.erasures`: account erasures not yet completed.",
"properties": {
"oldest_running_age_ms": {
"description": "Age of the oldest running erasure since it was requested; absent when none runs.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"running": {
"description": "Erasures still in their pass (`running`).",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"waiting": {
"description": "Erasures whose pass is done but whose kept rows are pending (`waiting`).",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"running",
"waiting"
],
"type": "object"
},
"StatusExports": {
"description": "`status.exports` on `GET /mgmt/v1/status`.",
"properties": {
"last_done_at": {
"description": "The last export that finished `done`.",
"format": "date-time",
"type": [
"string",
"null"
]
},
"last_failed_at": {
"description": "The last export that failed.",
"format": "date-time",
"type": [
"string",
"null"
]
},
"on_disk_bytes": {
"description": "Bytes of archives on disk.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"queued": {
"description": "Queued exports.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"running": {
"description": "The running export.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": [
"string",
"null"
]
}
},
"required": [
"queued",
"on_disk_bytes"
],
"type": "object"
},
"StatusFiles": {
"description": "File state in `status`.",
"properties": {
"ffmpeg_available": {
"description": "Whether `ffmpeg` answered `-version` at boot (video posters need it).",
"type": "boolean"
}
},
"required": [
"ffmpeg_available"
],
"type": "object"
},
"StatusGateway": {
"description": "`status.gateway` (0.7.1): the gateway's counters since this process started, the same\nnumbers as the `sew_gateway_*` metric families.",
"properties": {
"closes": {
"additionalProperties": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"description": "Server-sent closes by code (`\"4000\"`..`\"4014\"`, and `\"stall\"` for a writer that gave\nup); every code is listed, zeros included. Clients must accept a key they do not know.",
"type": "object"
},
"identify": {
"$ref": "#/$defs/StatusGatewayIdentify",
"description": "IDENTIFY outcomes."
},
"reauth": {
"$ref": "#/$defs/StatusGatewayReauth",
"default": {
"auth_failed": 0,
"ok": 0,
"timeout": 0
},
"description": "REAUTH outcomes (0.7.2, additive; zeros when an older server left it out)."
},
"resume": {
"$ref": "#/$defs/StatusGatewayResume",
"description": "RESUME outcomes."
},
"sockets_live": {
"description": "Sockets with READY or RESUMED queued.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"sockets_pending": {
"description": "Upgraded sockets not live yet (HELLO sent, no READY).",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"sockets_live",
"sockets_pending",
"identify",
"resume",
"closes"
],
"type": "object"
},
"StatusGatewayIdentify": {
"description": "`status.gateway.identify`: IDENTIFY outcomes since start.",
"properties": {
"auth_failed": {
"description": "Closed `4004`.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"error": {
"description": "Closed `4000` for any other reason.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"ok": {
"description": "READY sent.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"rate_limited": {
"description": "Closed `4008` (the install or the per-login limit).",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"timeout": {
"description": "Closed `4003 identify_timeout`: no IDENTIFY in time, or its ticket or token was not\nredeemed in time; or the READY build timed out (`4000`).",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"ok",
"rate_limited",
"auth_failed",
"timeout",
"error"
],
"type": "object"
},
"StatusGatewayReauth": {
"description": "`status.gateway.reauth` (0.7.2): REAUTH outcomes since start.",
"properties": {
"auth_failed": {
"description": "Closed `4004`: the token was refused, or names another member or credential.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"ok": {
"description": "The socket's login was swapped.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"timeout": {
"description": "Closed `4003 identify_timeout`: REAUTH's token was not redeemed within\n`identify_timeout_ms` of the REAUTH (the session left resumable).",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"ok",
"auth_failed",
"timeout"
],
"type": "object"
},
"StatusGatewayResume": {
"description": "`status.gateway.resume`: RESUME outcomes since start.",
"properties": {
"auth_failed": {
"description": "Closed `4004`.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"bad_seq": {
"description": "Closed `4007`.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"invalid": {
"description": "INVALID_SESSION sent.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"rate_limited": {
"description": "Closed `4008`.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"resumed": {
"description": "RESUMED sent.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"timeout": {
"description": "Closed `4003 identify_timeout`: RESUME's ticket or token was not redeemed in time.",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"resumed",
"invalid",
"bad_seq",
"rate_limited",
"auth_failed",
"timeout"
],
"type": "object"
},
"StatusIdentity": {
"description": "Identity provider state in `status`.",
"properties": {
"jwks_ok": {
"description": "Whether the JWKS cache holds keys (K2 only).",
"type": [
"boolean",
"null"
]
},
"jwks_url": {
"description": "`identity.k2.jwks_url` (K2 only).",
"type": [
"string",
"null"
]
},
"mode": {
"anyOf": [
{
"$ref": "#/$defs/ProviderKind"
},
{
"type": "null"
}
],
"description": "The install's stored identity mode. It differs from `provider` only between\n`POST /mgmt/v1/identity/switch` and the restart that follows (additive)."
},
"provider": {
"$ref": "#/$defs/ProviderKind",
"description": "The provider."
},
"restart_required": {
"description": "The mode was switched and this process still serves the old one; restart Sew.",
"type": "boolean"
},
"switched_at": {
"description": "When the install switched from standalone to K2 (absent when it never did).",
"format": "date-time",
"type": [
"string",
"null"
]
},
"unlinked_local_members": {
"description": "Active members still on a `local:` id. On a switched install they keep password\nsign-in until K2 relinks or deactivates them (the transition state); absent on an\ninstall that never switched.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"provider"
],
"type": "object"
},
"StatusJobs": {
"description": "Job queue status.",
"properties": {
"dead": {
"description": "Jobs that exhausted their attempts.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"oldest_due_age_ms": {
"description": "`now − min(run_at)` over due, unleased jobs; absent if none (additive).",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"queued": {
"description": "Jobs waiting (not under a live lease).",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"running": {
"default": 0,
"description": "Jobs under a live lease (additive).",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"queued",
"dead"
],
"type": "object"
},
"StatusKeys": {
"description": "Key provider and keyring status.",
"properties": {
"current_month_ready": {
"description": "Whether this month's keys exist.",
"type": "boolean"
},
"kek_id": {
"description": "Current KEK id, 16 hex.",
"type": [
"string",
"null"
]
},
"lazy_creates_this_month": {
"default": 0,
"description": "Keys created lazily at write time this month.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"mirror": {
"anyOf": [
{
"$ref": "#/$defs/StatusKeysMirror"
},
{
"type": "null"
}
],
"description": "The keyring mirror block; absent from servers that predate it."
},
"mirror_age_ms": {
"description": "Age of the last good mirror write; absent if never ok.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"mirror_ok": {
"description": "Whether the off-box keyring mirror is current.",
"type": "boolean"
},
"next_month_prepared": {
"default": false,
"description": "Whether next month's install key exists.",
"type": "boolean"
},
"provider": {
"description": "The key provider kind: `systemd-credential`, `file` (additive).",
"type": [
"string",
"null"
]
},
"provider_ok": {
"description": "Whether the master key provider works.",
"type": "boolean"
},
"resurrected_keys": {
"default": 0,
"description": "Old key files for shredded kids, refused at open.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"retiring_kek_ids": {
"description": "Retiring KEK ids, 16 hex each.",
"items": {
"type": "string"
},
"type": "array"
},
"rewrap_pending": {
"default": 0,
"description": "Keyring entries still wrapped under a retiring KEK.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"shred_pending": {
"default": 0,
"description": "Shreds started but not finished.",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"provider_ok",
"current_month_ready",
"mirror_ok"
],
"type": "object"
},
"StatusKeysMirror": {
"description": "`status.keys.mirror`.",
"properties": {
"kind": {
"description": "Mirror kind: `dir`, `none` (`k2` reserved).",
"type": "string"
},
"last_ok_at": {
"description": "Last successful mirror operation.",
"format": "date-time",
"type": [
"string",
"null"
]
},
"oldest_pending_age_s": {
"description": "Age of the oldest pending name, seconds.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"pending": {
"description": "Names waiting to be pushed.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"stale": {
"description": "Alarm: a pending write is older than the stale threshold, or kind `none`.",
"type": "boolean"
},
"unknown_keys": {
"description": "Mirror entries that are neither local nor on the ledger.",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"kind",
"stale",
"pending",
"unknown_keys"
],
"type": "object"
},
"StatusMail": {
"description": "Outgoing mail in `status`.",
"properties": {
"configured": {
"description": "`[mail.smtp]` is set.",
"type": "boolean"
},
"failed_24h": {
"description": "Sends that failed in the last 24 h.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"last_error": {
"description": "The last failure (at most 200 characters, never an address).",
"type": [
"string",
"null"
]
},
"last_error_at": {
"description": "When the last failure happened.",
"format": "date-time",
"type": [
"string",
"null"
]
},
"last_ok_at": {
"description": "The last accepted send.",
"format": "date-time",
"type": [
"string",
"null"
]
},
"sent_24h": {
"description": "Sends accepted in the last 24 h.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"tls": {
"anyOf": [
{
"$ref": "#/$defs/MailTls"
},
{
"type": "null"
}
],
"description": "The connection security (absent when not configured)."
}
},
"required": [
"configured",
"sent_24h",
"failed_24h"
],
"type": "object"
},
"StatusRecording": {
"description": "`status.recording`.",
"properties": {
"active": {
"description": "Active recordings.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"audio_bytes": {
"description": "Stored audio bytes.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"backend": {
"description": "Its backend.",
"type": [
"string",
"null"
]
},
"backlog_audio_s": {
"description": "Queued speech awaiting transcription.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"enabled": {
"description": "`[recording] enabled`.",
"type": "boolean"
},
"held_audio_bytes": {
"description": "Held audio bytes.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"model": {
"description": "The model the transcriber reports.",
"type": [
"string",
"null"
]
},
"oldest_pending_s": {
"description": "Age of the oldest stored, untranscribed segment.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"recorder_ok": {
"description": "The recorder answers health.",
"type": "boolean"
},
"rejoins_1h": {
"description": "Rejoins in the last hour.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"rtf_1h": {
"description": "Realtime factor over the last hour.",
"format": "double",
"type": [
"number",
"null"
]
},
"tracks": {
"description": "Allowlisted tracks install-wide.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"transcriber_ok": {
"description": "The transcriber answers health.",
"type": "boolean"
},
"workers": {
"description": "Its workers.",
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"enabled",
"recorder_ok",
"transcriber_ok",
"workers",
"active",
"tracks",
"rejoins_1h",
"backlog_audio_s",
"oldest_pending_s",
"audio_bytes",
"held_audio_bytes"
],
"type": "object"
},
"StatusRetention": {
"description": "`status.retention` on `GET /mgmt/v1/status`.",
"properties": {
"active_holds": {
"description": "Unreleased holds.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"last_ok_at": {
"description": "When the last run finished `done`.",
"format": "date-time",
"type": [
"string",
"null"
]
},
"last_run_at": {
"description": "When the last run finished.",
"format": "date-time",
"type": [
"string",
"null"
]
},
"last_run_state": {
"anyOf": [
{
"$ref": "#/$defs/RunState"
},
{
"type": "null"
}
],
"description": "How the last run ended."
},
"overdue": {
"description": "A finite policy is set and no run finished `done` for 48 h.",
"type": "boolean"
},
"pending_policies": {
"description": "Pending policies.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"search_pending": {
"description": "Purged messages whose search documents are not deleted yet.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"shred_candidates": {
"description": "Scope-months waiting for a shred check.",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"overdue",
"pending_policies",
"active_holds",
"search_pending",
"shred_candidates"
],
"type": "object"
},
"StatusSearch": {
"description": "Search index status.",
"properties": {
"docs": {
"anyOf": [
{
"$ref": "#/$defs/StatusSearchDocs"
},
{
"type": "null"
}
],
"description": "Live documents in the index."
},
"generation": {
"description": "The live index generation (`gen-<n>`).",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"index_bytes": {
"description": "Bytes of the live index on disk.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"lag_ms": {
"description": "How far indexing trails writes: `now − min(created_at)` over pending or running\n`search_index` / `search_delete` jobs; 0 when none.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"last_commit_at": {
"description": "When the indexer last committed.",
"format": "date-time",
"type": [
"string",
"null"
]
},
"rebuild": {
"anyOf": [
{
"$ref": "#/$defs/StatusSearchRebuild"
},
{
"type": "null"
}
],
"description": "Present only while a rebuild runs."
},
"state": {
"anyOf": [
{
"$ref": "#/$defs/SearchState"
},
{
"type": "null"
}
],
"description": "`ready` or `missing` (rebuilding; searches answer 503)."
}
},
"type": "object"
},
"StatusSearchDocs": {
"description": "Live search documents by type.",
"properties": {
"files": {
"description": "File-name documents.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"messages": {
"description": "Message documents.",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"messages",
"files"
],
"type": "object"
},
"StatusSearchRebuild": {
"description": "A running search rebuild.",
"properties": {
"docs": {
"description": "Documents in the building index so far.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"generation": {
"description": "The generation being built.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"progress_pct": {
"description": "0–99 until the swap.",
"format": "uint8",
"maximum": 255,
"minimum": 0,
"type": "integer"
},
"reason": {
"description": "Why: `marker`, `missing`, `corrupt`, `meta_mismatch` or `admin`.",
"type": "string"
},
"started_at": {
"description": "When it started.",
"format": "date-time",
"type": "string"
}
},
"required": [
"reason",
"generation",
"progress_pct",
"docs",
"started_at"
],
"type": "object"
},
"StatusVoiceE2ee": {
"description": "`status.voice.e2ee`.",
"properties": {
"ca_kid": {
"description": "The CA key id; absent when the key failed to load.",
"type": [
"string",
"null"
]
},
"calls": {
"description": "Live key groups.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"crl_size": {
"description": "Serials in the in-memory CRL.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"devices": {
"description": "Unrevoked enrolled devices.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"ds_kid": {
"description": "The DS key id; absent when the key failed to load.",
"type": [
"string",
"null"
]
},
"lagging": {
"description": "Lagging leaves.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"leaves": {
"description": "Leaves across them.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"per_call": {
"default": [],
"description": "One entry per live key group, sorted by `call_id` (Sew 0.7.1). No member, device, join\nid or key material: what K2 needs to diagnose a stuck call without the mgmt socket.",
"items": {
"$ref": "#/$defs/StatusVoiceE2eeCall"
},
"type": "array"
},
"rebuilding": {
"description": "Calls rebuilding after a restart.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"removal_overdue_1h": {
"description": "Removals past their hard bound in the last hour.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"resets_1h": {
"description": "Group resets in the last hour.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"roster_reports_1h": {
"description": "Roster-kind reports in the last hour.",
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"calls",
"leaves",
"lagging",
"rebuilding",
"resets_1h",
"removal_overdue_1h",
"roster_reports_1h",
"devices",
"crl_size"
],
"type": "object"
},
"StatusVoiceE2eeCall": {
"description": "One call in `status.voice.e2ee.per_call` (Sew 0.7.1).",
"properties": {
"active_epoch": {
"description": "The last activated epoch; absent before the first activation.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"awaiting_creator": {
"description": "The call waits for its first joiner to create the group.",
"type": "boolean"
},
"backoff": {
"description": "The call is in reset back-off.",
"type": "boolean"
},
"call_id": {
"description": "The call (its room name, as the key routes carry it).",
"pattern": "^r_[a-z2-7]{26}$",
"type": "string"
},
"epoch": {
"description": "The DS group's epoch.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"generation": {
"description": "Group resets so far (0 for the first group).",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"leaves_by_state": {
"$ref": "#/$defs/StatusVoiceE2eeLeaves",
"description": "Leaves by state."
},
"pending": {
"description": "Admitted joins without a leaf yet.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"queue_len": {
"description": "Queued changes.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"rebuilding": {
"description": "The call is rebuilding after a `sew` restart.",
"type": "boolean"
},
"resetting": {
"description": "A group reset is in flight.",
"type": "boolean"
}
},
"required": [
"call_id",
"generation",
"epoch",
"leaves_by_state",
"pending",
"queue_len",
"awaiting_creator",
"resetting",
"rebuilding",
"backoff"
],
"type": "object"
},
"StatusVoiceE2eeLeaves": {
"description": "Leaf counts by state in a [`StatusVoiceE2eeCall`].",
"properties": {
"active": {
"description": "Acked.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"joining": {
"description": "Welcomed, not yet acked.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"lagging": {
"description": "Left behind (behind the active epoch).",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"leaving": {
"description": "Being removed.",
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"joining",
"active",
"lagging",
"leaving"
],
"type": "object"
},
"VoiceEngineState": {
"description": "The engine as `status.voice.engine` sees it (`details.engine` of a voice `503`).",
"oneOf": [
{
"const": "up",
"description": "Healthy.",
"type": "string"
},
{
"const": "down",
"description": "Unreachable for `health_failures_down` checks in a row.",
"type": "string"
},
{
"const": "draining",
"description": "Draining.",
"type": "string"
},
{
"const": "syncing",
"description": "Sew is resyncing from a snapshot.",
"type": "string"
},
{
"const": "error",
"description": "The engine answered with an error, or the call keys failed to load.",
"type": "string"
}
]
},
"VoiceEngineStatus": {
"description": "`status.voice.engine` (the media engine's health).",
"properties": {
"down_since": {
"description": "When the engine went down (state `down`).",
"format": "date-time",
"type": [
"string",
"null"
]
},
"drift_fixes_1h": {
"description": "Drift the snapshot audits fixed in the last hour.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"last_event_at": {
"description": "The last event Sew applied.",
"format": "date-time",
"type": [
"string",
"null"
]
},
"last_snapshot_at": {
"description": "The last snapshot audit.",
"format": "date-time",
"type": [
"string",
"null"
]
},
"panics_1h": {
"description": "Engine panics in the last hour.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"participants": {
"description": "Participants the engine reports.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"rooms": {
"description": "Rooms the engine reports.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"state": {
"$ref": "#/$defs/VoiceEngineState",
"description": "The engine's state."
},
"version": {
"description": "The engine's version, from its last health answer.",
"type": [
"string",
"null"
]
}
},
"required": [
"state",
"rooms",
"participants",
"panics_1h",
"drift_fixes_1h"
],
"type": "object"
},
"VoiceMediaPathStatus": {
"description": "`status.voice.media_path`.",
"properties": {
"media_path_reason": {
"description": "K2's reason, while `down`.",
"type": [
"string",
"null"
]
},
"since": {
"description": "Since when (the start of this Sew process while it has always been `up`).",
"format": "date-time",
"type": "string"
},
"state": {
"$ref": "#/$defs/MediaPathState",
"description": "`up` or `down`."
}
},
"required": [
"state",
"since"
],
"type": "object"
},
"VoiceMediaStatus": {
"description": "The video, DM call and media budget part of `status.voice`.",
"properties": {
"budget_source": {
"$ref": "#/$defs/BudgetSource",
"description": "Where the budget's egress comes from."
},
"calls_active": {
"description": "Active DM calls.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"egress_budget_mbps": {
"description": "`[voice.video] egress_budget_mbps`.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"egress_mbps": {
"description": "The egress the tiers use (the engine's measured egress, or the estimate), Mbit/s.",
"format": "double",
"type": "number"
},
"engine_cpu_pct": {
"description": "The engine cgroup's CPU against its allowance; `null` when unknown.",
"format": "double",
"type": [
"number",
"null"
]
},
"forward_estimate_mbps": {
"description": "The forwarding estimate, Mbit/s.",
"format": "double",
"type": "number"
},
"media_tier": {
"$ref": "#/$defs/MediaTier",
"description": "The media budget tier."
},
"screen_publishers": {
"description": "Screen-share leases install-wide.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"video_enabled": {
"description": "`[voice.video] enabled` (and voice enabled).",
"type": "boolean"
},
"video_publishers": {
"description": "Camera leases install-wide.",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"calls_active",
"video_publishers",
"screen_publishers",
"media_tier",
"budget_source",
"egress_mbps",
"egress_budget_mbps",
"forward_estimate_mbps",
"video_enabled"
],
"type": "object"
},
"VoiceStatus": {
"description": "`status.voice`. Absent when voice is off\nand was never configured.",
"properties": {
"calls": {
"description": "Live calls (voice channels with occupants).",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"e2ee": {
"anyOf": [
{
"$ref": "#/$defs/StatusVoiceE2ee"
},
{
"type": "null"
}
],
"description": "The call key service."
},
"enabled": {
"description": "`[voice] enabled`.",
"type": "boolean"
},
"engine": {
"$ref": "#/$defs/VoiceEngineStatus",
"description": "The engine."
},
"media": {
"anyOf": [
{
"$ref": "#/$defs/VoiceMediaStatus"
},
{
"type": "null"
}
],
"description": "Video, DM calls and the media budget, as `status.voice.media` (the wire\ntypes never use `flatten`, so these fields nest like `e2ee`). Absent\nwhile voice is off."
},
"media_path": {
"anyOf": [
{
"$ref": "#/$defs/VoiceMediaPathStatus"
},
{
"type": "null"
}
],
"description": "The media path K2 reports (`POST /mgmt/v1/voice/media-path`)."
},
"participants": {
"description": "Voice entries.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"public_url": {
"description": "`[voice] public_url`.",
"type": [
"string",
"null"
]
},
"reconnecting": {
"description": "Entries inside a reconnect window.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"secure_participants": {
"description": "Entries whose device is in the activated key epoch.",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"enabled",
"calls",
"participants",
"secure_participants",
"reconnecting",
"engine"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Response of `GET /mgmt/v1/status`.",
"properties": {
"alarms": {
"default": [],
"description": "Every active alarm, sorted (additive). K2 shows them verbatim.",
"items": {
"$ref": "#/$defs/StatusAlarm"
},
"type": "array"
},
"backup": {
"anyOf": [
{
"$ref": "#/$defs/StatusBackup"
},
{
"type": "null"
}
],
"description": "Backups (the backup engine fills it)."
},
"client_listen": {
"description": "The client listener as `http://<bound address>` (additive).",
"type": [
"string",
"null"
]
},
"db": {
"$ref": "#/$defs/StatusDb",
"description": "Database status."
},
"digest": {
"anyOf": [
{
"$ref": "#/$defs/StatusDigest"
},
{
"type": "null"
}
],
"description": "The email digest (additive)."
},
"drill": {
"anyOf": [
{
"$ref": "#/$defs/StatusDrill"
},
{
"type": "null"
}
],
"description": "Restore drills (the backup engine fills it)."
},
"erasures": {
"anyOf": [
{
"$ref": "#/$defs/StatusErasures"
},
{
"type": "null"
}
],
"description": "Account erasures running and waiting (additive)."
},
"exports": {
"anyOf": [
{
"$ref": "#/$defs/StatusExports"
},
{
"type": "null"
}
],
"description": "Exports running, queued and on disk (additive)."
},
"features": {
"default": [],
"description": "The features this build has, sorted ([`FEATURES`]; additive). K2 tests a feature, not a\nversion. A flag is never removed or renamed once shipped.",
"items": {
"type": "string"
},
"type": "array"
},
"files": {
"anyOf": [
{
"$ref": "#/$defs/StatusFiles"
},
{
"type": "null"
}
],
"description": "Files (additive)."
},
"gateway": {
"anyOf": [
{
"$ref": "#/$defs/StatusGateway"
},
{
"type": "null"
}
],
"description": "The gateway's counters since this process started (0.7.1, additive): IDENTIFY and RESUME\noutcomes and server-sent closes by code. Absent from servers that predate it."
},
"identity": {
"anyOf": [
{
"$ref": "#/$defs/StatusIdentity"
},
{
"type": "null"
}
],
"description": "The identity provider's state (additive)."
},
"install_id": {
"description": "The install id.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": "string"
},
"jobs": {
"$ref": "#/$defs/StatusJobs",
"description": "Job queue status."
},
"keys": {
"$ref": "#/$defs/StatusKeys",
"description": "Key status."
},
"mail": {
"anyOf": [
{
"$ref": "#/$defs/StatusMail"
},
{
"type": "null"
}
],
"description": "Outgoing mail (additive)."
},
"provider": {
"$ref": "#/$defs/ProviderKind",
"description": "The identity provider."
},
"recording": {
"anyOf": [
{
"$ref": "#/$defs/StatusRecording"
},
{
"type": "null"
}
],
"description": "Recording and transcription (additive). Absent while recording is off."
},
"retention": {
"anyOf": [
{
"$ref": "#/$defs/StatusRetention"
},
{
"type": "null"
}
],
"description": "Retention runs, pending policies, holds and shred candidates (additive)."
},
"schema_version": {
"description": "The applied schema version.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"search": {
"$ref": "#/$defs/StatusSearch",
"description": "Search status."
},
"sessions": {
"description": "Live login sessions.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"sockets": {
"description": "Open gateway sockets.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"started_at": {
"description": "When this process started (additive).",
"format": "date-time",
"type": [
"string",
"null"
]
},
"uptime_ms": {
"default": 0,
"description": "Time since this process started (additive).",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"version": {
"description": "The Sew version.",
"type": "string"
},
"voice": {
"anyOf": [
{
"$ref": "#/$defs/VoiceStatus"
},
{
"type": "null"
}
],
"description": "Voice, the media engine and call keys (additive). Absent while\nvoice was never configured."
}
},
"required": [
"version",
"schema_version",
"install_id",
"provider",
"db",
"jobs",
"search",
"keys",
"sessions",
"sockets"
],
"title": "Status",
"type": "object"
}