Rotate agent token
POST
/k8s/agents/{cluster_id}/rotate
const url = 'https://shoehorn.example.com/api/v1/k8s/agents/example/rotate';const options = {method: 'POST'};
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://shoehorn.example.com/api/v1/k8s/agents/example/rotateGenerates a new token and invalidates the previous one.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” cluster_id
required
string
Responses
Section titled “ Responses ”New token generated
Media type application/json
object
token
string
Example generated
{ "token": "example"}