Version: v1
Excubio Watch API
API of excubio-watch (docs/watch.md). The API conventions are those of
the hub API (docs/api/hub.yaml), and x-excubio-role uses the roles
and scopes of the cloud API conventions (docs/api/cloud.yaml), with
check-token for a check's token and cloud for the cloud's client
certificate.
- Beats. Heartbeat and reverse-check URLs carry their check token
in the path; senders that can set headers send it as a bearer header
instead, with
-in place of the token in the path. It is the only credential and authorises nothing but the beat or the check. Paths with tokens are redacted in logs. - Management API (
/api/v1). The cloud UI's Watch page andexcubioctlcall Watch directly, never through the cloud. They authenticate with the access token of a Zitadel login of the tenant's organization, the same organization as for the cloud (docs/watch.md §3), issued for Watch's own OIDC client; Watch verifies it with the organization's signing keys and finds the tenant by the organization; of several tenants that share one (docs/architecture.md §12), the one whose slug the request names in the headerExcubio-Tenant, which the cloud UI always sends, else the only one where the login holds a role. Watch keeps no session; it answers CORS, preflight included, for the check operations (/api/v1/checksand below) to the exact origin of a tenant's cloud UI (https://<slug>.and the host of the cloud's public URL,EXCUBIO_CLOUD_PUBLIC_URL), for tenants it holds, without credentials, and to no other origin. Scripts use API tokens (exk_…) that Watch issues. Since Watch never calls the cloud, it learns who holds the tenant rolesauditorandtenant-admin(docs/architecture.md §10) from the cloud with the tenant (PUT /internal/v1/tenants/{tenant}): auditors read, tenant admins also write. - The cloud's pushes (
/internal/v1, tagreplica). The cloud is the only writer of tenants, their roles and numbers, their hubs and the rotation replica, and it repeats every push with each replica push, every 5 minutes, so that a call Watch missed is made up by the next (docs/watch.md §5). Each is a full statement and idempotent. - Tenant states (docs/architecture.md §12): the management API of
a suspended tenant reads only (
403tenant.suspendedfor writes) while its checks are evaluated and page as before; a deleting tenant is deleted with the push that says so. - Errors. Problem codes are listed with their meaning in the
Problem schema (
x-enumDescriptions). Every management operation can answer401(auth.unauthenticated),403(auth.forbidden),404(object.not_found),422(request.invalid) and429(request.rate_limited); every write also409(idempotency.in_progress) and422(idempotency.mismatch). Operations list the other codes they answer with.
Authentication
- HTTP: Bearer Auth
- HTTP: Bearer Auth
- Cloud Certificate
- API Key: carrierSignature
API token of the tenant (exk_…), issued by Watch
Security Scheme Type: | http |
|---|---|
HTTP Authorization Scheme: | bearer |
Access token of a Zitadel login of the tenant's organization, issued for Watch's OIDC client
Security Scheme Type: | http |
|---|---|
HTTP Authorization Scheme: | bearer |
The cloud's client certificate
Verified with the carrier's scheme
Security Scheme Type: | apiKey |
|---|---|
Header parameter name: | X-Carrier-Signature |