Issue a new secret; the previous one keeps working during the overlap (default 24 h)
POST
/api-credentials/{credentialId}/rotate
const url = 'https://acme.gravitastec.com/api/v1/api-credentials/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rotate';const options = { method: 'POST', headers: { cookie: '__Host-gravitas=<__Host-gravitas>', 'Content-Type': 'application/json' }, body: '{"overlapHours":24}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://acme.gravitastec.com/api/v1/api-credentials/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rotate \ --header 'Content-Type: application/json' \ --cookie __Host-gravitas=<__Host-gravitas> \ --data '{ "overlapHours": 24 }'Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Path Parameters
Sección titulada «Path Parameters»credentialId
required
string format: uuid
Request Body
Sección titulada «Request Body»Media typeapplication/json
object
overlapHours
integer
Responses
Sección titulada «Responses»New secret (shown once)
Media typeapplication/json
object
clientSecret
string
Example generated
{ "clientSecret": "example"}Not found or outside the credential scope
Media typeapplication/problem+json
object
type
string
title
string
status
integer
code
string
errors
Array<object>
object
path
string
message
string
Example generated
{ "type": "example", "title": "example", "status": 1, "code": "example", "errors": [ { "path": "example", "message": "example" } ]}