Reinstate a release gate version
const url = 'https://example.com/v1/release-gates/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/release-gates/example/versions/example/reinstate \ --header 'Authorization: Bearer <token>'Needs admin on the workspace.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The release gate id.
A semver version of the release gate.
Responses
Section titled “Responses”The reinstated version.
object
The whole workspace.
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 pin must show. Every part is optional; an empty spec checks nothing. A pin must name a comparison (testRunId) exactly when the spec has comparison, evidence, metrics, replay, cases or onlyExpertGroups. Unknown keys are refused.
object
object
object
The evidence from corrections 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 pinned version).
Each knob left out of the block is 0. No block: no replay checks.
object
At most this many tool calls the replay refused (the comparison summary’s refusedWrites). Reads count too, despite the name.
The cases the comparison graded: each correction it checked is a case, and it passes when every repetition did.
object
At least this many cases pass.
No case that passed before fails: none of the comparison’s corrections that are fixed now fails it. One the comparison didn’t grade isn’t counted; the check’s message says how many of the cases fixed now it graded.
A passing pin waits for a reviewer.
object
Default senior.
Default true.
Only expert groups count: the comparison must be weighted experts-only, so a group anyone may assert can’t move the gate.
Present only on an unregistered version: a retired gate (every version unregistered) as GET /v1/release-gates?includeRetired=true lists it.
Example
{ "scope": { "kind": "tenant" }, "spec": { "metrics": [ { "name": "passRate" } ], "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" }}permission-denied: the caller may not make this change. Without an authorization store, key-project-mismatch (details.keyProjectId): the API key or session is limited to a project, and this writes above it, to the workspace, an org or a team (with a store, that is permission-denied).
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" }}release-gate-scope-taken: another release gate gates the agent for the scope now (details.heldBy). release-gate-scope-unpinned: the scope has no pinned 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" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
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" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
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" }}The authorization store couldn’t be reached (authz-backend-unavailable), or the database was too busy for the authorization check (database-busy), so the request wasn’t run; Retry-After (whole seconds) says when to try again. Or tenant-state-unavailable (with Retry-After), on a runtime serving many workspaces: the workspace’s state couldn’t be read, so nothing was changed.
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" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
See also
GET /v1/release-gates/{releaseGateId}: Get a release gateGET /v1/release-gates/{releaseGateId}/versions: List a release gate's versionsGET /v1/release-gates/{releaseGateId}/versions/{version}: Get a release gate versionPOST /v1/release-gates/{releaseGateId}/versions/{version}/unregister: Unregister a release gate version- Error code
authz-backend-unavailable - Error code
database-busy - Error code
key-project-mismatch - Error code
permission-denied - Error code
rate-limit-exceeded - Error code
release-gate-scope-taken - Error code
release-gate-scope-unpinned - Error code
tenant-state-unavailable - Every error code