Skip to content

List a tenant's cloud secrets

View as Markdown
GET
/v1/system/tenants/{tenantId}/env
curl --request GET \
--url 'https://example.com/v1/system/tenants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/env?envName=example&scopeKind=tenant&limit=25' \
--header 'Authorization: Bearer <token>'

The env names set to a cloud secret at one scope of the tenant and one env, in name order, each with its cloudSecret. Takes system:env-refs.

tenantId
required
string format: uuid

The tenant’s id.

envName
required

Per-environment slug. [a-z][a-z0-9-]{0,62} — RFC-1035-like label.

string
/^[a-z][a-z0-9-]{0,62}$/

[a-z][a-z0-9-]{0,62}. Required on every env + secrets route.

scopeKind
required

Discriminator for the ?scopeKind + ?scopeId + ?inherit triplet. Tenant carries no id (implicit from session); org/project require scopeId.

string
Allowed values: tenant org project

Required on every env + secrets route. Tenant carries no scopeId; org / project require scopeId.

scopeId
string
>= 1 characters

Required IF scopeKind is org or project. MUST be absent if scopeKind=tenant (the workspace is implicit from the session). Malformed combinations return 400 scope-invalid.

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.

A page of them.

Media typeapplication/json
object
data
required
Array<object>

An env name, at a scope and env, given to a pack service as a version of a secret the operator’s cloud holds. The pack service’s cloud reads it, as the pack service’s own account: the runtime keeps the name, never a value.

object
scope
required
One of:
object
kind
required
string
Allowed values: tenant
tenantId
required
string
envName
required

Per-environment slug. [a-z][a-z0-9-]{0,62} — RFC-1035-like label.

string
/^[a-z][a-z0-9-]{0,62}$/
name
required
string
cloudSecret
required

A version of a secret in the operator’s cloud, by its resource name: projects/<project>/secrets/<secret>/versions/<number>, with a project id (6 to 30 lowercase letters, digits and hyphens) or number, a secret id of 1 to 255 letters, digits, _ and -, and a version number (never latest or an alias). A secret whose id starts with kp- is never one: those are the pack services’ own copies.

string
revision
required
integer
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
hasMore
required

Whether there’s another page.

boolean
nextCursor
string
Example
{
"data": [
{
"scope": {
"kind": "tenant"
}
}
]
}

Missing or malformed scope / envName.

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

A tenant’s key or session (system-principal-required), or a system key without system:env-refs (system-scope-missing). On a runtime serving one tenant, a system key reaches these only when it runs a pack service per deployment.

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 tenant with that id, or a purged one (tenant-not-found).

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

This runtime keeps no cloud secrets (cloud-secrets-unsupported): hosted, for one.

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