# List gate policies

GET

/v1/gate-policies

```sh
curl --request GET \
  --url 'https://example.com/v1/gate-policies?limit=25&scopeKind=tenant' \
  --header 'Authorization: Bearer <token>'
```

Each gate policy’s latest active version. `agentId` narrows it to one agent’s; `scopeKind` (with `scopeId` and `segment`) to one scope’s.

## Authorizations

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

## Parameters

### Query Parameters

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

**agentId**

string

Only the policies gating this agent.

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

## Responses

### 200

Page of gate policies.

application/json

object

**data**

required

Array\<object>

object

**id**

required

string

**version**

required

string

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

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

**hasMore**

required

boolean

**nextCursor**

string

##### Example

```json
{
  "data": [
    {
      "scope": {
        "kind": "tenant"
      },
      "spec": {
        "metrics": [
          {
            "name": "weightedYesShare"
          }
        ],
        "approvals": {
          "role": "standard"
        }
      }
    }
  ]
}
```

### 400

Malformed scope or cursor.

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

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

## See also

- [`POST /v1/gate-policies`: Publish a gate policy](https://docs.kindgi.com/v0.1.9/reference/api/operations/gatepoliciespublish.md)
- [Every error code](https://docs.kindgi.com/v0.1.9/reference/errors.md)
