Rotate another role's API key
Replaces the API key of another role that you can update with a new random API key. The new API key is returned as the response body.
|
URI
PUT
|
Any identifier included in the URL must be URL-encoded to be recognized by the Conjur API.
Examples:
Identifier |
URL-Encoded |
---|---|
|
|
|
|
|
|
|
|
|
|
Kinds of Roles
Kind |
Description |
---|---|
User |
One unique human |
Host |
A single logical machine (in the broad sense, not just physical) |
Layer |
A collection of hosts that have the same privileges |
Group |
A collection of users and groups that have the same privileges |
Policy |
A role that owns of a set of related objects |
Permissions required
update
privilege on the role whose API key is being rotated.
Example with curl
Suppose your account is myorg and you want to rotate the API key for user alice whose current password is Mypassw0rD1!:
|
Headers
Field |
Description |
Example |
---|---|---|
Authorization |
Supported basic auth credentials: |
Basic ZGFuaWVsOjlwOG5mc2RhZmJw |
Response
Code |
Description |
---|---|
200 |
The response body is the API key |
401 |
The credentials were not accepted |
403 |
The caller does not have sufficient permission to perform this action |
404 |
The target role does not exist or the caller does not have permission to see the target's role |
405 |
The target role does not have an API key |
Example URI
|
URI Parameters
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
account |
String |
Yes |
Organization account name.
|
kind |
String |
Yes |
The kind of the role whose API key we will rotate Example: |
identifier |
String |
Yes |
The ID of the role Example: |
Request
Headers
|
Requests that rotate a role's own API key must use their |
Response 200
Headers
|
Body
|