Skip to main content

relay_core_http/
lib.rs

1//! relay-core-http — REST + SSE HTTP API adapter
2//!
3//! Exposes relay-core capabilities as a versioned REST API so any language
4//! or tool can integrate without a Rust dependency.
5//!
6//! # API surface (v1)
7//!
8//! | Method | Path                              | Description                        |
9//! |--------|-----------------------------------|------------------------------------|
10//! | GET    | /api/v1/version                   | Server & API version               |
11//! | GET    | /api/v1/metrics                   | Runtime metrics                    |
12//! | GET    | /api/v1/metrics/prometheus        | Prometheus text metrics            |
13//! | GET    | /api/v1/status                    | Runtime lifecycle snapshot         |
14//! | GET    | /api/v1/flows                     | Search flows (query params)         |
15//! | GET    | /api/v1/flows/{id}                | Get single flow                    |
16//! | GET    | /api/v1/rules                     | List active rules                  |
17//! | PUT    | /api/v1/rules                     | Add/replace a rule (full Rule JSON) |
18//! | DELETE | /api/v1/rules/{id}                | Delete a rule                      |
19//! | POST   | /api/v1/mock                      | Quickly mock a URL pattern         |
20//! | POST   | /api/v1/intercepts                | Set a one-shot intercept breakpoint |
21//! | GET    | /api/v1/intercepts                | List pending intercepts            |
22//! | POST   | /api/v1/intercepts/{key}/resume   | Resume an intercepted flow         |
23//! | GET    | /api/v1/events                    | SSE stream of live flow events     |
24
25pub mod server;
26mod routes;
27
28pub use server::{HttpApiConfig, HttpApiServer};