# A judging rule's versions

GET

/v1/projects/{projectId}/judging-rules/{ruleId}/versions

```sh
curl --request GET \
  --url 'https://example.com/v1/projects/example/judging-rules/example/versions?limit=25' \
  --header 'Authorization: Bearer <token>'
```

Every version, newest first: who wrote it, when, and what it said. Needs `read` on the project.

## Authorizations

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

## Parameters

### Path Parameters

**projectId**

required

string

ProjectId — opaque branded string.

**ruleId**

required

string

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

## Responses

### 200

A page of versions.

application/json

object

**data**

required

Array\<object>

One version of a judging rule; the latest live one applies.

object

**ruleId**

required

string

**projectId**

required

string

**version**

required

integer

\>= 1

**name**

required

string

\>= 1 characters <= 200 characters

**when**

required

Which of a project’s runs a rule matches as they end. Every field narrows; absent fields don’t. `agentIds` or `flowIds`, not both. Top-level runs only (an agent’s own runs, not its turns as a flow’s step); replays never match.

object

**agentIds**

Array\<string>

\>= 1 items <= 50 items

**flowIds**

Array\<string>

\>= 1 items <= 50 items

**versions**

These versions exactly, or `live`: runs that got the agent’s live version, not one the caller named. Runs from before the runtime recorded how their version was chosen never match `live`.

Array\<string>

\>= 1 items <= 50 items

**status**

How the run ended. Only `completed` today: a judgment needs a completed run, so `failed` and `cancelled` are refused (400). Absent: `completed`.

Array\<string>

\>= 1 items

Allowed values: completed failed cancelled

**includeDryRuns**

Dry runs are left out unless `true`.

boolean

**sample**

required

number

\> 0 <= 1

**maxOpen**

Queue nothing while this rule has this many open items. Absent: no cap.

integer

\>= 1 <= 10000

**judgeClassId**

Whose judgment it wants: one of this class closes it. Absent: any judgment does.

string

**enabled**

required

boolean

**createdBy**

Who wrote this version.

string

**createdAt**

required

string format: date-time

**unregisteredAt**

string format: date-time

**hasMore**

required

boolean

**nextCursor**

string

##### Example

```json
{
  "data": [
    {
      "when": {
        "status": [
          "completed"
        ]
      }
    }
  ]
}
```

### 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 rule (`judging-rule-not-found`).

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/projects/{projectId}`: Fetch a project by id](https://docs.kindgi.com/v0.1.10/reference/api/operations/projectsget.md)
- [`PATCH /v1/projects/{projectId}`: Partially update a project](https://docs.kindgi.com/v0.1.10/reference/api/operations/projectsupdate.md)
- [`DELETE /v1/projects/{projectId}`: Delete a project (idempotent)](https://docs.kindgi.com/v0.1.10/reference/api/operations/projectsdelete.md)
- [`GET /v1/projects/{projectId}/judging-rules`: List a project's judging rules](https://docs.kindgi.com/v0.1.10/reference/api/operations/projectsjudgingruleslist.md)
- [Error code `judging-rule-not-found`](https://docs.kindgi.com/v0.1.10/reference/errors.md#judging-rule-not-found)
- [Every error code](https://docs.kindgi.com/v0.1.10/reference/errors.md)
