List where a data block's versions run
const url = 'https://example.com/v1/blocks/example/runs-in';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Block id: dotted lowercase (e.g. acme.intake-prompt).
Responses
Section titled “Responses”Where it runs.
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
The agent’s version that runs there, as agents.projects gives it.
The block version that agent version pins.
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.
A segment pin’s path inside the project, which runs agentVersion instead. Absent for the project’s own row.
object
Lowercase, like an identifier: company, contact-role.
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
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
As the repository said, read at most a minute ago.
Example
{ "data": [ { "follows": "pin", "inYourFiles": { "state": "yes", "pr": { "state": "open" } } } ]}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
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.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}runs-in-unsupported: this runtime doesn’t read the agents’ pins and Latest.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
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.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}See also
GET /v1/blocks/{blockId}: Fetch a data block (latest version)GET /v1/blocks/{blockId}/versions: List versions of a data blockGET /v1/blocks/{blockId}/versions/{version}: Fetch a specific data block versionPOST /v1/blocks/{blockId}/versions/{version}/unregister: Unregister a data block version- Kindgi 0.4.0
- Error code
block-not-found - Error code
database-busy - Error code
runs-in-unsupported - Every error code