credentials.ssh.rotate
POST
/credentials/ssh/{credentialId}/rotate
const url = 'https://example.com/api/credentials/ssh/example/rotate';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"privateKey":"example","publicKey":"example","username":"example","confirmation":{"credentialId":"example","acknowledgeServerUsage":true},"idempotencyKey":"example"}'};
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://example.com/api/credentials/ssh/example/rotate \ --header 'Content-Type: application/json' \ --data '{ "privateKey": "example", "publicKey": "example", "username": "example", "confirmation": { "credentialId": "example", "acknowledgeServerUsage": true }, "idempotencyKey": "example" }'Rotates one reusable SSH credential in place after usage visibility and acknowledgement checks. Public docs: /docs/servers/credentials/ssh-keys/#server-ssh-credential-path
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” credentialId
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
Example generated
{ "privateKey": "example", "publicKey": "example", "username": "example", "confirmation": { "credentialId": "example", "acknowledgeServerUsage": true }, "idempotencyKey": "example"}Responses
Section titled “ Responses ”OK
Media type application/json
object
schemaVersion
required
string
credential
required
object
id
required
string
kind
required
string
usernameConfigured
required
boolean
publicKeyConfigured
required
boolean
privateKeyConfigured
required
boolean
rotatedAt
required
string
affectedUsage
required
object
totalServers
required
number
activeServers
required
number
inactiveServers
required
number
servers
required
Array<object>
object
serverId
required
string
serverName
required
string
lifecycleStatus
required
string
providerKey
required
string
host
required
string
username
string
Example
{ "schemaVersion": "credentials.rotate-ssh/v1", "credential": { "kind": "ssh-private-key" }, "affectedUsage": { "servers": [ { "lifecycleStatus": "active" } ] }}