# Get a promotion

GET

/v1/agents/{agentId}/promotions/{promotionId}

```sh
curl --request GET \
  --url https://example.com/v1/agents/example/promotions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
  --header 'Authorization: Bearer <token>'
```

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/v0.1.10/reference/api.md#bearerauth)**

## Parameters

### Path Parameters

**agentId**

required

string

AgentId — dotted namespace (`acme.drafting`).

**promotionId**

required

string format: uuid

## Responses

### 200

The promotion.

application/json

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

- **object**

  The agent’s default for the whole tenant.

  object

  **kind**

  required

  string

  Allowed values: tenant

- **object**

  An org’s projects.

  object

  **kind**

  required

  string

  Allowed values: org

  **orgId**

  required

  string format: uuid

- **object**

  One project.

  object

  **kind**

  required

  string

  Allowed values: project

  **projectId**

  required

  string format: uuid

- **object**

  A segment path within a project: it covers every run whose path starts with it.

  object

  **kind**

  required

  string

  Allowed values: segment

  **projectId**

  required

  string format: uuid

  **path**

  required

  Array\<object>

  \>= 1 items <= 8 items

  object

  **key**

  required

  Lowercase, like an identifier: `company`, `contact-role`.

  string

  /^\[a-z]\[a-z0-9\_-]{0,63}$/

  **value**

  required

  string

  \>= 1 characters <= 256 characters

**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**

  object

  **id**

  required

  string

  **version**

  required

  string

- **null**

  null

**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

##### Example

```json
{
  "scope": {
    "kind": "tenant"
  },
  "action": "promote",
  "requestedBy": {
    "kind": "user"
  },
  "status": "promoted"
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/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

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 404

No such promotion for this agent.

application/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

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

## See also

- [`GET /v1/agents/{agentId}`: Fetch the latest version of an agent](https://docs.kindgi.com/v0.1.10/reference/api/operations/agentsget.md)
- [`GET /v1/agents/{agentId}/versions`: List versions of an agent](https://docs.kindgi.com/v0.1.10/reference/api/operations/agentslistversions.md)
- [`POST /v1/agents/{agentId}/versions`: Derive an agent version with data-block pins swapped](https://docs.kindgi.com/v0.1.10/reference/api/operations/agentsderiveversion.md)
- [`GET /v1/agents/{agentId}/versions/{version}`: Fetch a specific agent version](https://docs.kindgi.com/v0.1.10/reference/api/operations/agentsgetversion.md)
- [Every error code](https://docs.kindgi.com/v0.1.10/reference/errors.md)
