Open source / Rust / MIT Field guide / indexed
Field guide / Events APIReviewable source / main

Events API

The platform domain-event feed and alert surface: list events and alerts, and acknowledge alerts singly or in batch.

4 routes

Response metadata: x-api-version, x-request-id, and traceresponse apply to normal routed responses and are omitted from the per-operation header tables below.

GET/api/events

request access

The operational domain-event feed (#11).

Newest first, with optional event_type / aggregate_id filters. Distinct from the audit feed: this is the operational stream other subsystems consume (alert generation, dashboards). Request-tier read, site/environment-scoped (#2): a scoped principal sees only its own scope's events plus events that are platform-wide (NULL) on BOTH axes. The cross-scope rule is SYMMETRIC: a SITE-ONLY event (concrete site, NULL environment — e.g. a decommission) is NOT visible to an environment-scoped principal, and an ENV-ONLY event (NULL site, concrete environment) is NOT visible to a site-scoped one — in each case the mutating handlers fail closed for that principal, so the feed must not be more permissive. Empty + durable:false when no DB is configured.

Permissions

Access classCredentialScoping
requestAn authenticated session or API bearer token is required.The access class is enforced first; site and environment scopes narrow resources on scoped operations.

HTTP request

GET https://<your-host>/api/events

Path parameters

This operation has no path parameters.

Query parameters

NameTypeRequirementDescription
event_typestringOptionalFilter to one dotted event type, e.g. request.approve.
aggregate_idstringOptionalFilter to one aggregate's history (e.g. a request id).
limitintegerOptionalPage size (default 50, capped 500).

Request headers

NameTypeRequirementDescription
AuthorizationstringOptionalHuman credential alternative: supply one Bearer rys_... session token, ryk_... API token, or validated identity-provider JWT here. Do not combine it with X-Ryuki-Session-Id or the session cookie; conflicting carriers fail closed.
X-Ryuki-Session-IdstringOptionalOpaque rys_... session-token carrier used by the portal for mutations. Administrative session UUIDs cannot authenticate. Supply exactly one credential carrier per request.
traceparentstringOptionalOptional correlation input. When the second dash-separated segment has 32 characters, Ryuki reuses it as the request correlation identifier; this is not full W3C validation.

Request body

This operation does not accept a request body.

Response

StatusDescriptionBody
200OKValue

200 response body

Structure: Value.

NameTypeRequirementDescription
eventsJSON valueRequiredValue of events returned in the response body.
durablebooleanRequiredValue of durable returned in the response body.

Errors

JSON failures use one of the platform error envelopes and include the request correlation metadata when routing reaches the API middleware. See Errors for the exact shapes, authentication failures, retry guidance, and transport-level exceptions.

Examples

Request

curl --silent --show-error --globoff \
  --request GET \
  --header 'Authorization: Bearer <token>' \
  'https://<your-host>/api/events'

Schematic response body

Illustrative shape generated from the extracted field types, not a recorded live response. Values are placeholders; null marks a field whose type could not be resolved.

Success status: 200

{
  "events": null,
  "durable": false
}

GET/api/events/alerts

monitoring.alert.read access

The alert-worthy slice of the domain-event stream (#11 slice 2a).

Reuses the scoped feed but keeps only events the pure event_alerts classifier flags — currently a request reaching a NEGATIVE terminal state: failed=critical, rejected=warning, cancelled=info — annotating each with its severity. The status filter is pushed into SQL (via the engine's authoritative status list) so the page is not short-counted when alerts are rare. The dedicated monitoring-alert read capability is checked before database access; site/environment scope is then applied in SQL. Empty + durable:false no DB.

Permissions

Access classCredentialScoping
monitoring.alert.readAn authenticated session or API bearer token is required.The access class is enforced first; site and environment scopes narrow resources on scoped operations.

HTTP request

GET https://<your-host>/api/events/alerts

Path parameters

This operation has no path parameters.

Query parameters

NameTypeRequirementDescription
event_typestringOptionalFilter to one dotted event type, e.g. request.approve.
aggregate_idstringOptionalFilter to one aggregate's history (e.g. a request id).
limitintegerOptionalPage size (default 50, capped 500).

Request headers

NameTypeRequirementDescription
AuthorizationstringOptionalHuman credential alternative: supply one Bearer rys_... session token, ryk_... API token, or validated identity-provider JWT here. Do not combine it with X-Ryuki-Session-Id or the session cookie; conflicting carriers fail closed.
X-Ryuki-Session-IdstringOptionalOpaque rys_... session-token carrier used by the portal for mutations. Administrative session UUIDs cannot authenticate. Supply exactly one credential carrier per request.
traceparentstringOptionalOptional correlation input. When the second dash-separated segment has 32 characters, Ryuki reuses it as the request correlation identifier; this is not full W3C validation.

Request body

This operation does not accept a request body.

Response

StatusDescriptionBody
200OKValue

200 response body

Structure: Value.

NameTypeRequirementDescription
alertsJSON valueRequiredValue of alerts returned in the response body.
durablebooleanRequiredValue of durable returned in the response body.

Errors

JSON failures use one of the platform error envelopes and include the request correlation metadata when routing reaches the API middleware. See Errors for the exact shapes, authentication failures, retry guidance, and transport-level exceptions.

Examples

Request

curl --silent --show-error --globoff \
  --request GET \
  --header 'Authorization: Bearer <token>' \
  'https://<your-host>/api/events/alerts'

Schematic response body

Illustrative shape generated from the extracted field types, not a recorded live response. Values are placeholders; null marks a field whose type could not be resolved.

Success status: 200

{
  "alerts": null,
  "durable": false
}

POST/api/events/alerts/batch/ack

monitoring.alert.acknowledge access

Acknowledge up to 100 alerts in one call (#19).

Mirrors the requests_batch_* (#17) shape: the dedicated acknowledgement capability is checked up front, ids are deduped + capped at 100, then each id runs the SAME per-item scope/ack core (ack_alert_one) as the single endpoint — so a batch can NEVER ack an out-of-scope alert, and one bad id never aborts the rest. Per-item independent; partial success; HTTP 200 always with {results, succeeded, failed}.

Permissions

Access classCredentialScoping
monitoring.alert.acknowledgeAn authenticated session or API bearer token is required.The access class is enforced first; site and environment scopes narrow resources on scoped operations.

HTTP request

POST https://<your-host>/api/events/alerts/batch/ack

Path parameters

This operation has no path parameters.

Query parameters

This operation has no query parameters.

Request headers

NameTypeRequirementDescription
AuthorizationstringOptionalHuman credential alternative: supply one Bearer rys_... session token, ryk_... API token, or validated identity-provider JWT here. Do not combine it with X-Ryuki-Session-Id or the session cookie; conflicting carriers fail closed.
Content-TypestringRequiredRequired by the resolved Axum Json<T> request extractor; send application/json.
X-Ryuki-Session-IdstringOptionalOpaque rys_... session-token carrier used by the portal for mutations. Administrative session UUIDs cannot authenticate. Supply exactly one credential carrier per request.
Idempotency-KeystringOptionalOptional at-most-once retry key for human mutations. When omitted, the idempotency middleware passes the request through without deduplication.
traceparentstringOptionalOptional correlation input. When the second dash-separated segment has 32 characters, Ryuki reuses it as the request correlation identifier; this is not full W3C validation.

Request body

JSON structure: BatchAlertAckBody.

NameTypeRequirementDescription
event_idsarray<integer>RequiredValue of event_ids in the JSON request body.
notestringOptionalValue of note in the JSON request body.

Response

StatusDescriptionBody
200OKValue

200 response body

Structure: Value.

NameTypeRequirementDescription
resultsJSON valueRequiredResults returned by this operation.
succeededJSON valueRequiredValue of succeeded returned in the response body.
failedJSON valueRequiredValue of failed returned in the response body.

Errors

JSON failures use one of the platform error envelopes and include the request correlation metadata when routing reaches the API middleware. See Errors for the exact shapes, authentication failures, retry guidance, and transport-level exceptions.

Examples

Request

curl --silent --show-error --globoff \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '{"event_ids":[]}' \
  'https://<your-host>/api/events/alerts/batch/ack'

Schematic response body

Illustrative shape generated from the extracted field types, not a recorded live response. Values are placeholders; null marks a field whose type could not be resolved.

Success status: 200

{
  "results": null,
  "succeeded": null,
  "failed": null
}

POST/api/events/alerts/{event_id}/ack

monitoring.alert.acknowledge access

Acknowledge an alert (#11 slice 2e).

Marks the alert (a domain_events row) as seen by the acting principal; the feed then shows acknowledged + who/when. Re-acking updates in place. Requires the dedicated monitoring-alert acknowledgement capability. 404 when the event id is unknown, 400 on a control-character note, 503 with no DB.

Permissions

Access classCredentialScoping
monitoring.alert.acknowledgeAn authenticated session or API bearer token is required.The access class is enforced first; site and environment scopes narrow resources on scoped operations.

HTTP request

POST https://<your-host>/api/events/alerts/{event_id}/ack

Path parameters

NameTypeRequirementDescription
event_idintegerRequiredIdentifier of the target resource in the request path.

Query parameters

This operation has no query parameters.

Request headers

NameTypeRequirementDescription
AuthorizationstringOptionalHuman credential alternative: supply one Bearer rys_... session token, ryk_... API token, or validated identity-provider JWT here. Do not combine it with X-Ryuki-Session-Id or the session cookie; conflicting carriers fail closed.
Content-TypestringRequiredRequired by the resolved Axum Json<T> request extractor; send application/json.
X-Ryuki-Session-IdstringOptionalOpaque rys_... session-token carrier used by the portal for mutations. Administrative session UUIDs cannot authenticate. Supply exactly one credential carrier per request.
Idempotency-KeystringOptionalOptional at-most-once retry key for human mutations. When omitted, the idempotency middleware passes the request through without deduplication.
traceparentstringOptionalOptional correlation input. When the second dash-separated segment has 32 characters, Ryuki reuses it as the request correlation identifier; this is not full W3C validation.

Request body

JSON structure: AlertAckBody.

NameTypeRequirementDescription
notestringOptionalValue of note in the JSON request body.

Response

StatusDescriptionBody
200OKValue

200 response body

Structure: Value.

NameTypeRequirementDescription
acknowledgedbooleanRequiredValue of acknowledged returned in the response body.
event_idJSON valueRequiredValue of event_id returned in the response body.
acknowledged_byJSON valueRequiredValue of acknowledged_by returned in the response body.

Errors

JSON failures use one of the platform error envelopes and include the request correlation metadata when routing reaches the API middleware. See Errors for the exact shapes, authentication failures, retry guidance, and transport-level exceptions.

Examples

Request

curl --silent --show-error --globoff \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '{}' \
  'https://<your-host>/api/events/alerts/<event_id>/ack'

Schematic response body

Illustrative shape generated from the extracted field types, not a recorded live response. Values are placeholders; null marks a field whose type could not be resolved.

Success status: 200

{
  "acknowledged": false,
  "event_id": null,
  "acknowledged_by": null
}
Last updated 2026-07-16 · Generated from the API route registrations.