ReferenceControl-plane API
Response objects
The JSON shapes a workspace, a project, a tenant, an API key and a secret key are returned as.
Generated from
packages/api/src/resources/serialize.ts by packages/docs/tools/generate-reference.mjs.Every resource carries an object field naming its type. Timestamps are ISO 8601 strings or null. A minted or rotated key adds key and key_shown_once: true to the object below, in that one response and never again.
workspace
| Field | Source |
|---|---|
object | 'workspace' as const |
id | row.id |
name | row.name |
slug | row.slug |
billing_email | row.billing_email |
embed_origins | row.embed_origins |
created_at | iso(row.created_at) |
updated_at | iso(row.updated_at) |
project
| Field | Source |
|---|---|
object | 'project' as const |
id | row.id |
name | row.name |
slug | row.slug |
policy_version | Number(row.policy_version) |
default_rate_limits | row.default_rate_limits |
created_at | iso(row.created_at) |
updated_at | iso(row.updated_at) |
tenant
| Field | Source |
|---|---|
object | 'tenant' as const |
id | row.id |
external_id | row.external_id |
name | row.name |
meta | row.meta |
embed_epoch | row.embed_epoch |
created_at | iso(row.created_at) |
updated_at | iso(row.updated_at) |
api_key
Neither hash is in the column list these rows come from, so no serialiser can leak one by forgetting to omit it. The plaintext is not on the row at all -- it exists only in the response the mint or rotate handler builds by hand.
| Field | Source |
|---|---|
object | 'api_key' as const |
id | row.id |
project_id | row.project_id |
tenant_id | row.tenant_id |
env | row.env |
display_prefix | row.display_prefix |
name | row.name |
scopes | row.scopes |
meta | row.meta |
rate_limits | row.rate_limits |
expires_at | iso(row.expires_at) |
revoked_at | iso(row.revoked_at) |
revoked_reason | row.revoked_reason |
quarantined_at | iso(row.quarantined_at) |
quarantine_reason | row.quarantine_reason |
rotated_from | row.rotated_from |
created_at | iso(row.created_at) |
last_used_at | iso(row.last_used_at) |
secret_key
| Field | Source |
|---|---|
object | 'secret_key' as const |
id | row.id |
env | row.env |
display_prefix | row.display_prefix |
name | row.name |
meta | row.meta |
expires_at | iso(row.expires_at) |
revoked_at | iso(row.revoked_at) |
revoked_reason | row.revoked_reason |
quarantined_at | iso(row.quarantined_at) |
quarantine_reason | row.quarantine_reason |
rotated_from | row.rotated_from |
created_at | iso(row.created_at) |
last_used_at | iso(row.last_used_at) |