Record where a deployment's pack service runs
const url = 'https://example.com/v1/system/tenants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deployments/example/endpoint';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"example","auth":"google-id-token","token":"example","packEnvRevision":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/v1/system/tenants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deployments/example/endpoint \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "auth": "google-id-token", "token": "example", "packEnvRevision": "example" }'Records the endpoint, once every check passes: the URL is https://<host> (endpoint-url-invalid); its host is on the operator’s allowlist (endpoint-host-not-allowed); its host names the deployment’s own service, packServiceName(tenantId, deploymentId) then - or . (endpoint-name-mismatch); the image is in the tenant’s repository (image-not-allowed); the pack service answers /v1/info, with the kindgi-tenant-id header, as this deployment (endpoint-unreachable, endpoint-info-mismatch, with the names of the fields that differed). A refusal is also recorded as the endpoint’s problem, which the tenant sees as a code. The deployment’s endpoint is then ready. Refused for a closing or suspended tenant, project or pack, so a sweep can’t recreate a service another one retired. Takes system:deployments. The same body twice records it once.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”Recorded: the deployment’s endpoint as its tenant sees it.
Its pack service’s status, when the server routes each pack call to the deployment that shipped the tool (KINDGI_PACK_ROUTING=per-deployment). Absent otherwise, and for a deployment that ships nothing a pack service serves (no tool, and no guardrail check but built-in ones: a pack of agents and flows only), which needs none. pending: no pack service yet, and calls to its tools fail (pack-endpoint-pending) rather than go to another deployment. ready: calls go to its own pack service. cleared: its pack service was taken down, and calls fail (pack-endpoint-cleared); it carries waiting or retired to say whether it comes back. Carries no URL and no token.
object
Example
{ "status": "pending", "waiting": true, "packEnvProblem": { "code": "pack-env-ambiguous" }, "keptFor": [ { "registered": true, "held": true } ]}A malformed body (bad-input), or a URL that isn’t https://<host> (endpoint-url-invalid).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
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
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No such tenant (tenant-not-found), or no such deployment in it (deployment-not-found).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The tenant is closing or suspended (tenant-closing, tenant-suspended), or the project or pack is (project-suspended, pack-suspended); the image is outside the tenant’s repository (image-not-allowed). Or idempotency-key-in-flight (with Retry-After): a request with the same Idempotency-Key still runs, so this one wasn’t run; send it again after Retry-After to get that request’s answer.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”The request body is over the API’s limit (request-too-large; details.maxBytes says how much).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The host isn’t allowed (endpoint-host-not-allowed) or doesn’t name the deployment’s service (endpoint-name-mismatch, with details.expected); the pack service didn’t answer (endpoint-unreachable) or answered as another pack or version (endpoint-info-mismatch, with details.differs).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Server error (unmapped domain code or framework crash).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The operator’s access record can’t be written, so nothing was done (access-record-unavailable), or the Idempotency-Key store couldn’t be read before the request ran (idempotency-store-unavailable, with Retry-After). Or the authorization store couldn’t be reached (authz-backend-unavailable, with Retry-After), or the database was too busy for the authorization check (database-busy, with Retry-After), so the request wasn’t run.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”See also
DELETE /v1/system/tenants/{tenantId}/deployments/{deploymentId}/endpoint: Clear a deployment's endpointGET /v1/system/tenants: List tenantsPOST /v1/system/tenants: Create a tenantGET /v1/system/tenants/{tenantId}: Read a tenant- Error code
access-record-unavailable - Error code
authz-backend-unavailable - Error code
bad-input - Error code
database-busy - Error code
deployment-not-found - Error code
endpoint-host-not-allowed - Error code
endpoint-info-mismatch - Error code
endpoint-name-mismatch - Error code
endpoint-unreachable - Error code
endpoint-url-invalid - Error code
idempotency-key-in-flight - Error code
idempotency-store-unavailable - Error code
image-not-allowed - Error code
pack-suspended - Error code
project-suspended - Error code
request-too-large - Error code
system-principal-required - Error code
system-scope-missing - Error code
tenant-closing - Error code
tenant-not-found - Error code
tenant-suspended - Every error code