Skip to content

List the pinned versions that cover a project

View as Markdown
GET
/v1/projects/{projectId}/pinned-versions
curl --request GET \
--url 'https://example.com/v1/projects/example/pinned-versions?limit=25' \
--header 'Authorization: Bearer <token>'

Every agent’s pinned versions that cover the project: the tenant’s, the project’s org’s, the project’s own and its segments’, ordered by agent id, then scope. A run in the project takes the most specific one that covers it, else its agent’s latest version. For readers of the project (read), and only the pins of agents and versions the caller can read, as GET /v1/agents/{agentId}/pinned-versions shows them. A page can hold fewer pins than limit, or none, with hasMore true: page on nextCursor, not the count. 501 pinned-versions-not-supported from a runtime that can’t list them.

projectId
required
string

ProjectId — opaque branded string.

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.

Page of pinned versions.

Media typeapplication/json
object
data
required
Array<object>
object
agentId
required
string
scope
required
One of: discriminator: kind

The whole tenant.

object
kind
required
string
Allowed values: tenant
version
required
string
changeId
required

The pin change that set it.

string format: uuid
setAt
required
string format: date-time
hasMore
required
boolean
nextCursor
string
Example
{
"data": [
{
"scope": {
"kind": "tenant"
}
}
]
}

A malformed project id or cursor.

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

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

No project with that id under this tenant.

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 runtime can’t list a project’s pinned versions (pinned-versions-not-supported).

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