List deployments that need a pack service, or should lose theirs
const url = 'https://example.com/v1/system/deployments?endpoint=missing&limit=25';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/system/deployments?endpoint=missing&limit=25' \ --header 'Authorization: Bearer <token>'Across tenants, oldest activatedAt first. endpoint=missing: deployments that need a pack service. Each is routed (the newest deployment with routes for some tool version or pack check), has no endpoint or a cleared one, and nothing about it is closing or suspended. endpoint=retire: deployments with an endpoint whose pack service should go, each with its reason. Name each service packServiceName(tenantId, deploymentId) (@kindgi/api). Takes system:deployments. Each entry carries the tenant’s id and nothing else of it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”missing: deployments that need a pack service. retire: deployments whose pack service should go.
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.
1..100. Default 25.
Responses
Section titled “Responses”One page of deployments.
object
A deployment as whatever runs its pack service needs it: ids and the image, nothing of the tenant beyond its id. Name the service packServiceName(tenantId, deploymentId) (@kindgi/api). In the retire list, reason says why the service should go.
object
The pack it deploys (the image index’s packId).
The project the deploy was scoped to. Absent for a tenant-wide deploy.
Digest-pinned, as registered: the pack service is created from exactly this.
In the retire list only. superseded: newer deployments ship every tool version and check it does, so no new call reaches it. A tool call a step made on it still goes back to it when the step runs again, and fails closed (pack-endpoint-cleared) once its endpoint is cleared. tenant-closing, tenant-suspended: every deployment of the tenant, routed or not. project-suspended, pack-suspended: every deployment of the project, or this one.
Opaque cursor for the next page. Absent when hasMore: false.
Example
{ "data": [ { "reason": "superseded" } ]}endpoint missing or neither missing nor retire; a limit out of range; a cursor refused.
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" }}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" }}A tenant’s key or session (system-principal-required), or a system key without system:deployments (system-scope-missing).
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" }}