List gate policies
const url = 'https://example.com/v1/gate-policies?limit=25&scopeKind=tenant';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/gate-policies?limit=25&scopeKind=tenant' \ --header 'Authorization: Bearer <token>'Each gate policy’s latest active version. agentId narrows it to one agent’s; scopeKind (with scopeId and segment) to one scope’s.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”1..100. Default 25.
Where the previous page ended: its nextCursor, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise 400 bad-input, and the list starts again without it. Absent → first page.
Only the policies gating this agent.
Only one scope: tenant, org or project (with scopeId), or segment (with scopeId and segment).
Required IF scopeKind is org or project. MUST be absent if scopeKind=tenant (tenant is implicit from the session). Malformed combinations return 400 scope-invalid.
One step of the segment path, key:value; repeat it in order, coarse to fine.
Responses
Section titled “Responses”Page of gate policies.
object
object
The agent’s default for the whole tenant.
object
An org’s projects.
object
One project.
object
A segment path within a project: it covers every run whose path starts with it.
object
object
Lowercase, like an identifier: company, contact-role.
What a promotion must show. Every part is optional; an empty spec checks nothing. A promotion must name a comparison (evalRunId) exactly when the spec has comparison, evidence, metrics, replay or onlyRestrictedClasses. Unknown keys are refused.
object
object
object
The judged evidence behind each gated metric; for a metric with maxDrop, the baseline’s too.
object
object
weightedPrecisionAtK only: the summary’s k must be this.
How far the candidate may fall below the baseline (the live version).
Each knob left out of the block is 0. No block: no replay checks.
object
A passing promotion waits for a reviewer.
object
Default senior.
Default true.
Only restricted judge classes count: the comparison must be weighted restricted-only, so a class anyone may assert can’t move the gate.
Example
{ "data": [ { "scope": { "kind": "tenant" }, "spec": { "metrics": [ { "name": "weightedYesShare" } ], "approvals": { "role": "standard" } } } ]}Malformed scope or cursor.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}