On this page
Create key in Workload tenants
Creates an environment key and returns HTTP 201.
Creates an environment key and returns HTTP 201. Idempotency-Key is required. A replay within 24 hours returns key metadata without plaintext.
- Path
POST https://api.sylphx.com/v1/access/workload/tenants/external-tenant-id/keys - Scope
access:whoami - Effect
write— a successful call changes state. - Collection workload_tenants
- Host
https://api.sylphx.com
Request
| Field | Type | What it is |
|---|---|---|
external_tenant_id | string | Workspace ID in the calling workload's namespace. Required. |
label | string | Display label for the key. Required. |
scopes | string[] | Nonempty scope set. Any scope outside the grant's ceiling is refused. Required. |
Response
| Field | Type | What it is |
|---|---|---|
key | WorkloadTenantKey | Issued key's metadata. |
secret | string | Plaintext credential (never returned on replay). Never returned again. |
WorkloadTenantKey
| Field | Type | What it is |
|---|---|---|
key_id | string | Credential ID, not its secret value. |
label | string | Caller-supplied label. |
scopes | string[] | Exact scopes the key carries (including a registered aggregate, if requested). |
created_at | timestamp | Key issuance time. |
revoked_at | timestamp | Key revocation time, absent for a live key. |
Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.RESOURCE_NOT_FOUND— The named Resource does not exist or is not visible.INVALID_FIELD— A field failed validation.IDEMPOTENCY_KEY_REUSED— An Idempotency-Key was reused with another body.
Every error arrives in the body Errors describes.
Examples
curl -X POST "https://api.sylphx.com/v1/access/workload/tenants/external-tenant-id/keys" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"label":"…","scopes":["…"]}'