Read the env a deployment's pack service is to be given
const url = 'https://example.com/v1/system/tenants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deployments/example/pack-env?secrets=values';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/tenants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deployments/example/pack-env?secrets=values' \ --header 'Authorization: Bearer <token>'For whatever runs the deployment’s pack service: where each name its pack declares is set (at the deployment’s project, then its org, then the tenant, at the env the server serves), and the values when nothing stands in the way. A name set two ways (pack-env-ambiguous: two of a plain value, a secret and a cloud secret), a required one set nowhere (pack-env-missing), or one set only as a secret whose value wasn’t asked for (pack-env-secret-not-yet) is a problem, and then no value is given. With secrets=values, each name set only as a secret is given in secrets, read at the version its revision names; a secret that can’t be read for a reason the platform fixes is pack-env-secret-unreadable, and then no value is given. Each name set to a cloud secret is given in cloudSecrets, with its version’s resource name, for the pack service’s host to read as the pack service’s own account. Each value given out is on the audit record, a secret’s written before the answer. Refused for a retired deployment (endpoint-retired) and a closing or suspended tenant. On a key of its own, system:pack-env: system:deployments reads no value, and kindgi:system no secret’s.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Where each name is set, and the values when there is no problem.
What the deployment’s pack service is to be given: where each declared name is set, and the values when nothing stands in the way, plain ones in env and, when asked for (secrets=values), secrets in secrets; and the names set to a cloud secret, with its path, in cloudSecrets. Each value given out is on the audit record: env-resolved as the deployment’s system read, and secret-resolved (caller pack-env, with the request id as its correlationId and the system key’s id), written before the answer.
object
Example
{ "names": [ { "kind": "env", "scope": { "kind": "project" }, "problem": "ambiguous", "secretScope": { "kind": "project" }, "cloudSecretScope": { "kind": "project" } } ], "problem": "pack-env-ambiguous"}A secrets other than values (bad-input).
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), a system key without system:pack-env (system-scope-missing), or with secrets=values, a key that doesn’t hold system:pack-env itself, kindgi:system included (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 deployment’s pack service was retired (endpoint-retired).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The server doesn’t give a pack service its declared env: its pack services take theirs from how they’re run (pack-env-unsupported). Or, with secrets=values, it has nowhere to audit a secret given out, so it gives none (pack-env-secrets-unaudited).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}With secrets=values: the secret store is out, a secret changed while it was read, twice, or the secrets’ audit rows weren’t written. Nothing is given: try again (pack-env-unavailable). Or the database was too busy to answer in time (database-busy, with Retry-After). Or the authorization store couldn’t be reached (authz-backend-unavailable, 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
PUT /v1/system/tenants/{tenantId}/deployments/{deploymentId}/pack-env: Record the env revision a deployment's pack service runsGET /v1/system/tenants: List tenantsPOST /v1/system/tenants: Create a tenantGET /v1/system/tenants/{tenantId}: Read a tenant- Error code
authz-backend-unavailable - Error code
bad-input - Error code
database-busy - Error code
deployment-not-found - Error code
endpoint-retired - Error code
pack-env-secrets-unaudited - Error code
pack-env-unavailable - Error code
pack-env-unsupported - 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