Identifies the calling client as <name>/<version>, for example reunite-ui/0.92.1. Used for API consumer observability. Requests without it are attributed as unknown.
Replaces the access token of a shared GitLab, Azure DevOps, or Bitbucket token credential. Redocly validates the new token with the Git provider before saving it. Rotating any other credential type returns 400.
To find the credentialId, list the sources or remotes of the project that uses the credential.
Only shared credentials can be rotated with an API key. Personal credentials return 404. Use an API key with granular permissions that include org.credentials.update, or a legacy full access key. API keys with RBAC permissions return 403.
After saving the token, Redocly sets up webhooks again for the repositories that use the credential. Repositories where the webhook setup fails are listed in warnings.
Requires org.credentials.update permission.
- Mock serverhttps://redocly.com/_mock/docs/platform/customization/reunite-api/openapi/orgs/{orgId}/credential-rotations
- Production main server.https://app.cloud.redocly.com/api/orgs/{orgId}/credential-rotations
- Production EU server.https://app.cloud.eu.redocly.com/api/orgs/{orgId}/credential-rotations
curl -i -X POST \
https://redocly.com/_mock/docs/platform/customization/reunite-api/openapi/orgs/org_01h1s5z6vf2mm1mz3hevnn9va7/credential-rotations \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'x-redocly-client: reunite-ui/0.92.1' \
-d '{
"credentialId": "cred_01h1s5z6vf2mm1mz3hevnn9va7",
"secretData": {
"accessToken": "string"
}
}'Credential ID. Unique identifier prefixed with cred_.
User ID this credentials belongs to. Unique identifier prefixed with usr_.
Credential parent ID. Unique identifier prefixed with cred_.
[ "Failed to set up webhook for repository \"fe5d7747-af71-449a-951b-f781f54603af\": Azure DevOps token does not have sufficient permissions. Please check token scopes." ]
{ "id": "cred_01h1s5z6vf2mm1mz3hevnn9va7", "object": "credential", "uri": "https://app.cloud.redocly.com/api/orgs/org_01hh1t9sa6gwfv5naz04gr7ehm/credentials/cred_01h1s5z6vf2mm1mz3hevnn9va7", "type": "GITHUB_USER", "authType": "BASIC", "name": "string", "description": "string", "publicData": { "installationId": 0, "namespaceId": "string", "repositoryId": "string" }, "oAuth2Data": { "id": "4acc1f09-1751-6f79-b156-b6877ee205a2", "userName": "john-doe", "displayName": "John Doe", "email": "john-doe@mail.com", "avatarUrl": "https://avatars.githubusercontent.com/u/1?v=4" }, "userId": "usr_01hh1t9sa6gwfv5naz04gr7ehm", "isShared": false, "isBroken": false, "parentId": "cred_01h4e71x94vd68a1farnbfapzg", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "warnings": [ "Failed to set up webhook for repository \"fe5d7747-af71-449a-951b-f781f54603af\": Azure DevOps token does not have sufficient permissions. Please check token scopes." ] }