Secrets
Rotate a secret.
Roles: SECRET_WRITE, SECRET_ADMIN
User access: Yes.
Service account access: Yes.
Atomically creates an immediately active revision and disables all previous active revisions of this secret, including scheduled revisions. Retains history. Checks total and resulting active revision quotas. Returns revision metadata without the secret value. Does not rotate credentials at an external provider.
POST
/
api
/
v1
/
secrets
/
{secretId}
/
rotate
Rotate a secret.
curl --request POST \
--url https://api.revoengine.com/api/v1/secrets/{secretId}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"secret": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({secret: '<string>'})
};
fetch('https://api.revoengine.com/api/v1/secrets/{secretId}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/secrets/{secretId}/rotate"
payload = { "secret": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"secretDataId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secretId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active": true,
"actDate": "2023-11-07T05:31:56Z",
"version": 123,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"lastUpdateBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastUpdateAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"deletedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Body
application/json
Response
New revision metadata without secret material.
⌘I
Rotate a secret.
curl --request POST \
--url https://api.revoengine.com/api/v1/secrets/{secretId}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"secret": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({secret: '<string>'})
};
fetch('https://api.revoengine.com/api/v1/secrets/{secretId}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/secrets/{secretId}/rotate"
payload = { "secret": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"secretDataId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secretId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active": true,
"actDate": "2023-11-07T05:31:56Z",
"version": 123,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"lastUpdateBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastUpdateAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"deletedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
