Rotate Credential

View as Markdown

Stage a site-wide credential rotation: publish a new rotate-to secret and bump the site-wide target version. Devices converge to the new version asynchronously; poll the status endpoint to observe convergence. Equivalent to nico-admin-cli credential rotate.

User must have authorization role with PROVIDER_ADMIN suffix.

Authentication

AuthorizationBearer
``` export JWT_BEARER_TOKEN="<jwt-bearer-token>" # Example org name: "acme-inc export ORG_NAME=<org-name> # Use the JWT bearer token in your API request auth header: curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current ```

Path parameters

orgstringRequired
Name of the Org

Request

This endpoint expects an object.
siteIdstringRequiredformat: "uuid"
ID of the Site whose credential family is rotated.
credentialTypeenumRequired
Credential family to rotate.
passwordstringOptional>=1 character

Explicit rotate-to password. When omitted, a strong password is auto-generated. Never returned.

reasonstringOptional

Free-form operator note recorded with the rotation. Must not contain secrets.

Response

Credential rotation was staged
credentialTypeenum
Credential family that was rotated.
targetVersionlong

Newly published site-wide target version that devices converge to.

starteddatetime or null
When the rotation was staged.

Errors

400
Bad Request Error
403
Forbidden Error