Skip to content

Unregister a gate policy version

POST
/v1/gate-policies/{policyId}/versions/{version}/unregister
curl --request POST \
--url https://example.com/v1/gate-policies/example/versions/example/unregister \
--header 'Authorization: Bearer <token>'

The version stops applying; the policy’s latest remaining active version applies, or, with none, the scope above’s policy. Promotions keep the version they were checked against. Needs admin on the tenant.

policyId
required
string

The gate policy id.

version
required
string

A semver version of the gate policy.

The unregistered version.

Media typeapplication/json
object
id
required
string
version
required
string
agentId
required
string
scope
required
One of: discriminator: kind

The agent’s default for the whole tenant.

object
kind
required
string
Allowed values: tenant
spec
required

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
comparison
object
maxAgeHours
number
> 0
suite
object
id
required
string
version
string
evidence

The judged evidence behind each gated metric; for a metric with maxDrop, the baseline’s too.

object
minCases
integer
minWeight
number
metrics
Array<object>
object
name
required
string
Allowed values: weightedYesShare judgedCoverage weightedPrecisionAtK
k

weightedPrecisionAtK only: the summary’s k must be this.

integer
>= 1 <= 100
minCandidate
number
<= 1
maxDrop

How far the candidate may fall below the baseline (the live version).

number
<= 1
replay

Each knob left out of the block is 0. No block: no replay checks.

object
maxDiverged
integer
maxErrors
integer
maxRefusedWrites
integer
maxStopped
integer
approvals

A passing promotion waits for a reviewer.

object
role

Default senior.

string
Allowed values: standard senior admin
separateApprover

Default true.

boolean
onlyRestrictedClasses

Only restricted judge classes count: the comparison must be weighted restricted-only, so a class anyone may assert can’t move the gate.

boolean
description
string
createdAt
required
string format: date-time
unregisteredAt
string format: date-time
Example
{
"scope": {
"kind": "tenant"
},
"spec": {
"metrics": [
{
"name": "weightedYesShare"
}
],
"approvals": {
"role": "standard"
}
}
}

Malformed request body.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

No such version.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Idempotency-Key was reused with a different body, or resource-state conflict.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Server error (unmapped domain code or framework crash).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}