corvix.web.routes_api¶
Versioned /api/v1/* JSON route handlers (plus /metrics).
Thin decorated handlers that delegate to the implementation helpers in
snapshot, rule_snippets, and actions; this module owns only the
HTTP surface (paths, verbs, response types) and the theme presets.
Attributes¶
Functions¶
|
Expose Prometheus metrics in text exposition format for scraping. |
|
Return available theme presets. |
|
List configured dashboard names. |
|
Return the selected dashboard data from storage. |
Return prefilled ignore-rule snippets for a notification. |
|
|
Dismiss a notification thread (removes it from the GitHub inbox). |
|
Mark a notification thread as read in GitHub and local storage. |
Module Contents¶
- corvix.web.routes_api.metrics_endpoint() litestar.Response[bytes][source][source]¶
Expose Prometheus metrics in text exposition format for scraping.
- corvix.web.routes_api.api_themes() dict[str, object][source][source]¶
Return available theme presets.
- corvix.web.routes_api.dashboards() dict[str, object][source][source]¶
List configured dashboard names.
- corvix.web.routes_api.snapshot(dashboard: str | None = None) corvix.web.schemas.SnapshotResponse[source][source]¶
Return the selected dashboard data from storage.
- corvix.web.routes_api.notification_rule_snippets(account_id: str, thread_id: str, dashboard: str | None = None) corvix.web.schemas.RuleSnippetsResponse[source][source]¶
Return prefilled ignore-rule snippets for a notification.
- corvix.web.routes_api.dismiss_notification(account_id: str, thread_id: str) litestar.Response[None][source][source]¶
Dismiss a notification thread (removes it from the GitHub inbox).
Calls DELETE /notifications/threads/{id} on GitHub, then marks the record as dismissed in local storage. Returns 204 No Content on success.