Eden REST API
Endpoint Comparison APIs
/api/v1Endpoint Comparison APIs create continuous endpoint comparisons, control indefinite runs, retrieve aggregate and request-level evidence, and select one final endpoint behind an existing interlay.
Arenas
| Method | Path | Purpose |
|---|---|---|
POST | /api/v1/endpoint-comparisons/arenas | Create a validated arena. |
GET | /api/v1/endpoint-comparisons/arenas | List organization arenas. |
GET | /api/v1/endpoint-comparisons/arenas/{arena} | Read one arena. |
PATCH | /api/v1/endpoint-comparisons/arenas/{arena} | Update an inactive arena using expected_revision. |
DELETE | /api/v1/endpoint-comparisons/arenas/{arena} | Delete an arena with no run history. |
An arena accepts 2 to 16 unique same-organization direct endpoints matching the source interlay's endpoint kind. The compiled runtime must register an endpoint-comparison adapter for that kind. The caller needs shared endpoint READ and WRITE permission for the serving endpoint and every contender. Sample ratio is greater than zero and at most one, queue and concurrency limits must be positive, and retention is between 1 and 365 days.
Arena and immutable run responses expose source_endpoint_kind, per-contender endpoint_kind, protocol_family, comparison_scope, comparison_semantics, adapter ID/version, probe capabilities, and identity dispatch-plan kind/version. Current arenas are homogeneous.
Runs
| Method | Path | Purpose |
|---|---|---|
POST | /api/v1/endpoint-comparisons/arenas/{arena}/runs | Start an indefinite run. |
GET | /api/v1/endpoint-comparisons/runs | List runs. |
GET | /api/v1/endpoint-comparisons/runs/{run} | Read run state and its immutable arena snapshot. |
POST | /api/v1/endpoint-comparisons/runs/{run}/pause | Stop accepting comparison work without ending the run. |
POST | /api/v1/endpoint-comparisons/runs/{run}/resume | Resume a paused run. |
POST | /api/v1/endpoint-comparisons/runs/{run}/stop | End a run without selecting an endpoint. |
Only one active run may use an interlay. Running and paused runs are restored after Eden restarts. Interrupted completion either finalizes an already-applied selection, restores the untouched run to its prior state, or fails an ambiguous state for review. Normal interlay patches cannot replace the endpoint while a run is active.
Evidence
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/endpoint-comparisons/runs/{run}/summary | Aggregate dispatch and total p50/p95/p99 latency, throughput, rates, read/write counts, gaps, queue pressure, LLM evidence, and telemetry lag. |
GET | /api/v1/endpoint-comparisons/runs/{run}/timeseries | Bucket per-target latency and success data. |
GET | /api/v1/endpoint-comparisons/runs/{run}/requests | Cursor through correlated comparison requests. |
GET | /api/v1/endpoint-comparisons/runs/{run}/requests/{comparison_request_id} | Retrieve one parent event and its target observations. |
The request list accepts limit from 1 to 500 and an optional run-scoped before comparison ID. The cursor can continue through the retained run window rather than only the latest summary page. Each observation includes queue_delay_us, the compatibility field latency_us, explicit dispatch_latency_us, and total_latency_us. Canonical digests appear only for canonical adapters; LLM observations may include time-to-first-token, token-unit, and estimated-cost fields.
Completion
{
"selected_endpoint_uuid": "endpoint-uuid",
"expected_interlay_revision": "revision-from-interlay-response",
"acknowledge_warnings": true,
"data_readiness_evidence_ref": "change/CHG-1842"
}| Method | Path | Purpose |
|---|---|---|
POST | /api/v1/endpoint-comparisons/runs/{run}/completion/preflight | Return blockers, warnings, and an immutable evidence snapshot. |
POST | /api/v1/endpoint-comparisons/runs/{run}/complete | Drain comparison work and select the endpoint behind the existing interlay. |
Preflight validates adapter compatibility, endpoint health, direct routing, retained permissions, recent successful evidence, migration state, and the optimistic interlay revision. It always warns that write delivery is best effort. Known write gaps or evidence-sink loss block completion unless data_readiness_evidence_ref contains a printable external evidence reference of at most 512 characters and warnings are acknowledged.
Completion is idempotent for the same endpoint. It drains accepted comparisons for up to 30 seconds, restores the prior endpoint and run state on failure, and preserves the interlay address and governance settings. It does not synchronize endpoint data.
Protocol Semantics
| Endpoint | Semantics |
|---|---|
| PostgreSQL, MySQL, MongoDB | Canonical where safe; unsafe session operations are skipped. |
| Redis | Outcome-only with the current drain-only response profile. |
| LLM | Performance-only; generated content is not compared and side-effecting/tool requests are skipped. |
Eligible writes are dispatched best effort and surfaced through attempt, success, drop, and gap counts. Read attempts, successes, and comparison gaps are reported separately. Endpoint comparison is not a replication API.