Reinstate a gate policy version
const url = 'https://example.com/v1/gate-policies/example/versions/example/reinstate';const options = {method: 'POST', 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 POST \ --url https://example.com/v1/gate-policies/example/versions/example/reinstate \ --header 'Authorization: Bearer <token>'Needs admin on the tenant.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The gate policy id.
A semver version of the gate policy.
Responses
Section titled “Responses”The reinstated version.
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
{ "scope": { "kind": "tenant" }, "spec": { "metrics": [ { "name": "weightedYesShare" } ], "approvals": { "role": "standard" } }}Malformed request body.
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" }}No such version.
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" }}gate-policy-scope-taken: another policy gates the agent for the scope now (details.heldBy). gate-policy-scope-unpinned: the scope has no live version of its own; pin one first.
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" }}Server error (unmapped domain code or framework crash).
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" }}