Skip to content

List an agent's promotions

GET
/v1/agents/{agentId}/promotions
curl --request GET \
--url 'https://example.com/v1/agents/example/promotions?limit=25&scopeKind=tenant' \
--header 'Authorization: Bearer <token>'

The history of live-version changes (promotions, rollbacks, unpins), newest first. scopeKind (tenant, org, project, segment) with scopeId and segment narrows it to one scope.

agentId
required
string

AgentId — dotted namespace (acme.drafting).

limit
integer
default: 25 >= 1 <= 100

1..100. Default 25.

cursor
string

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.

scopeKind
string
Allowed values: tenant org project segment

Only one scope: tenant, org or project (with scopeId), or segment (with scopeId and segment).

scopeId
string
>= 1 characters

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.

segment
Array<string>

One step of the segment path, key:value; repeat it in order, coarse to fine.

Page of promotions.

Media typeapplication/json
object
data
required
Array<object>

One change of a scope’s live version, kept for good: what was live before, what is after, who asked and why.

object
id
required
string format: uuid
agentId
required
string
scope
required
One of: discriminator: kind

The agent’s default for the whole tenant.

object
kind
required
string
Allowed values: tenant
action
required
string
Allowed values: promote rollback unpin
fromVersion
required

The scope’s own pin before; null when it had none.

string | null
toVersion
required

The scope’s own pin after; null after an unpin.

string | null
requestedBy
required
object
kind
required
string
Allowed values: user service
id
required
string
reason
string
evalRunId

The comparison the change was judged on.

string
createdAt
required
string format: date-time
status

A promote row’s state: it changes once, from pending-approval to its final state. Absent on rollback and unpin rows, and on promotions made before gates (promoted).

string
Allowed values: promoted pending-approval refused superseded rejected expired
policy
One of:
object
id
required
string
version
required
string
checks
Array<object>

One of a gate’s checks, as the promotion records it.

object
name
required

Stable: comparison.required, comparison.status, comparison.freshness, comparison.suite, sameContents, baselineIsLive, scopeCovered, evidence.<metric>.minCases|minWeight|baselineMinCases|baselineMinWeight, metric.<metric>.k|minCandidate|maxDrop, replay.maxDiverged|maxErrors|maxRefusedWrites|maxStopped, classWeights.restrictedOnly.

string
passed
required
boolean
message
required

A plain sentence: what was found against what the policy asks.

string
value
number | string
threshold
number | string
approvalId

The approval a pending-approval promotion waits on (kept once decided).

string
resolvedAt

When a pending-approval promotion reached its final state.

string format: date-time
hasMore
required
boolean
nextCursor
string
Example
{
"data": [
{
"scope": {
"kind": "tenant"
},
"action": "promote",
"requestedBy": {
"kind": "user"
},
"status": "promoted"
}
]
}

Malformed scope or cursor.

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"
}
}