Register a new K8s agent
POST
/k8s/agents/register
const url = 'https://shoehorn.example.com/api/v1/k8s/agents/register';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"cluster_id":"example","display_name":"example","environment":"example","region":"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://shoehorn.example.com/api/v1/k8s/agents/register \ --header 'Content-Type: application/json' \ --data '{ "cluster_id": "example", "display_name": "example", "environment": "example", "region": "example" }'Registers a cluster and returns an agent token for push operations.
Request Body required
Section titled “Request Body required ” Media type application/json
object
cluster_id
required
string
display_name
required
string
environment
string
region
string
Example generated
{ "cluster_id": "example", "display_name": "example", "environment": "example", "region": "example"}Responses
Section titled “ Responses ”Agent registered
Media type application/json
object
cluster_id
string
token
Bearer token for push API
string
Example generated
{ "cluster_id": "example", "token": "example"}