agents-credentials

Rotate Agent Credential

Issues a replacement secret (returned once; the new row records rotated_from) and lets the old one keep working for grace_seconds (0-86400, default 0 = it stops now). A revoked or expired credential is 409 credential_revoked.

post/agents/{id}/credentials/{cid}/rotate

Request

  • Base URL: https://api.instruxi.dev/api/v1/enforcer
  • URL: https://api.instruxi.dev/api/v1/enforcer/agents/{id}/credentials/{cid}/rotate
  • Auth: one of:
    • API key in header Authorization
    • API key in header X-API-Key

Path parameters

idstring required

agent id

cidstring required

credential id

Request body

grace_secondsinteger

GraceSeconds is how long the old secret keeps working (0-86400).

Example request

{
  "grace_seconds": 3600
}

Response

OK

successboolean

Example response

{
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.