Skip to content

List where a data block's versions run

View as Markdown
GET
/v1/blocks/{blockId}/runs-in
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.

blockId
required
string
>= 1 characters

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

Where it runs.

Media typeapplication/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
{
"data": [
{
"follows": "pin",
"inYourFiles": {
"state": "yes",
"pr": {
"state": "open"
}
}
}
]
}

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

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

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

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

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

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

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

See also