# List where a data block's versions run

GET

/v1/blocks/{blockId}/runs-in

```sh
curl --request GET \
  --url https://example.com/v1/blocks/example/runs-in \
  --header 'Authorization: Bearer <token>'
```

Where the block’s versions run now: one row for each project, and each segment pin inside one, whose running version of an agent pins a version of the block (as a prompt, a settings block or its model settings). Each agent’s projects are the ones `agents.projects` lists, and what runs in each is what it says: a pin that covers the project, else its Latest. Only the projects the caller can read are named, and an agent version the caller can’t see is left out. A block no running version pins answers an empty list. Without the agents’ pins and Latest in this runtime, `501 runs-in-unsupported`.

## Authorizations

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

## Parameters

### Path Parameters

**blockId**

required

string

\>= 1 characters

Block id: dotted lowercase (e.g. `acme.intake-prompt`).

## Responses

### 200

Where it runs.

application/json

object

**data**

required

Array\<object>

One place a version of the block runs: a project, or a segment pin inside one, whose running version of an agent pins it.

object

**projectId**

required

string

**agentId**

required

string

**agentVersion**

required

The agent’s version that runs there, as `agents.projects` gives it.

string

**blockVersion**

required

The block version that agent version pins.

string

**follows**

required

Why the agent version runs there: `pin`, a pin that covers the project or the segment; `latest`, no pin covers it, so it runs the project’s Latest.

string

Allowed values: pin latest

**segment**

A segment pin’s path inside the project, which runs `agentVersion` instead. Absent for the project’s own row.

Array\<object>

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

**inYourFiles**

Whether the pack’s files have `blockVersion`: `yes` when the newest deployment in the project that ships `agentId` (its pack’s newest there, looked for among the project’s 200 newest deployments) lists the block at that version or a newer one, or the pull request opened for it there was merged; `not-yet` otherwise. Absent from a runtime that can’t say, and for a row whose pull request can’t be read now.

object

**state**

required

string

Allowed values: yes not-yet

**pr**

The newest pull request opened for this version in the project, a draft on the pack’s repository. Absent when none was opened: no repo connected, a pin wider than the project, or a version that came from the files.

object

**number**

required

integer

\>= 1

**url**

required

string

**state**

required

As the repository said, read at most a minute ago.

string

Allowed values: open merged closed

##### Example

```json
{
  "data": [
    {
      "follows": "pin",
      "inYourFiles": {
        "state": "yes",
        "pr": {
          "state": "open"
        }
      }
    }
  ]
}
```

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

`block-not-found`: no such block, or one in a project the caller can’t read.

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

### 501

`runs-in-unsupported`: this runtime doesn’t read the agents’ pins and Latest.

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

### 503

The database was too busy to answer in time (`database-busy`); `Retry-After` (whole seconds) says when to try again.

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/blocks/{blockId}`: Fetch a data block (latest version)](https://docs.kindgi.com/reference/api/operations/blocksget.md)
- [`GET /v1/blocks/{blockId}/versions`: List versions of a data block](https://docs.kindgi.com/reference/api/operations/blocksversionslist.md)
- [`GET /v1/blocks/{blockId}/versions/{version}`: Fetch a specific data block version](https://docs.kindgi.com/reference/api/operations/blocksversionsget.md)
- [`POST /v1/blocks/{blockId}/versions/{version}/unregister`: Unregister a data block version](https://docs.kindgi.com/reference/api/operations/blocksversionsunregister.md)
- [Kindgi 0.4.0](https://docs.kindgi.com/releases/0.4.0.md)
- [Error code `block-not-found`](https://docs.kindgi.com/reference/errors.md#block-not-found)
- [Error code `database-busy`](https://docs.kindgi.com/reference/errors.md#database-busy)
- [Error code `runs-in-unsupported`](https://docs.kindgi.com/reference/errors.md#runs-in-unsupported)
- [Every error code](https://docs.kindgi.com/reference/errors.md)
