Rotate credential on an agent
Rotates the captured value under the same handle with generation fencing.
Rotates the captured value under the same handle with generation fencing.
- Path
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/agents:rotate-credential - Scope
agents:sessions - Effect
write— a successful call changes state. - Collection agents
Request
| Field | Type | What it is |
|---|---|---|
parent | string | The environment that owns the captured handle. Required. |
handle | string | The opaque handle whose captured credential is being replaced. Required. Never returned again. |
generation | int64 | The current handle generation; stale rotations are refused. Required. |
credential | string | The replacement issuer-provided credential, stored encrypted. Required. Never returned again. |
expires_at | timestamp | The issuer-provided expiry of the replacement credential. Required. |
Response
| Field | Type | What it is |
|---|---|---|
handle | string | The opaque handle; it never reveals the captured credential. Output only. Never returned again. |
generation | int64 | The current fencing generation of the captured handle. Output only. |
expires_at | timestamp | The issuer-provided expiry of the captured credential. Output only. |
Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.INVALID_FIELD— A field failed validation.
Every error arrives in the body Errors describes.
Examples
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/agents:rotate-credential" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"credential":"…","expires_at":{},"generation":1,"handle":"…"}'