Admiral
Agents

Create an agent

POST
/api/v1/agents

The request's kind selects the agent's execution plane (TERRAFORM or KUBERNETES) and determines the SAT's auto-assigned scopes. The kind is immutable.

The response includes a plain_text_token: the raw SAT secret shown exactly once. Deploy this token to the agent binary for authentication.

Scope: agent:write

Authorization

bearerAuth
AuthorizationBearer <token>

Personal Access Token (PAT) or Service Access Token (SAT). Pass the token in the Authorization header: Bearer admp_...

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.admiral.io/api/v1/agents" \  -H "Content-Type: application/json" \  -d '{    "kind": "AGENT_KIND_UNSPECIFIED",    "name": "string"  }'
{  "agent": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "kind": "AGENT_KIND_UNSPECIFIED",    "name": "string",    "description": "string",    "labels": {      "property1": "string",      "property2": "string"    },    "health_status": "AGENT_HEALTH_STATUS_UNSPECIFIED",    "cluster_uid": "string",    "created_by": {      "id": "string",      "display_name": "string",      "email": "string"    },    "created_at": "2023-01-15T01:30:15.01Z",    "updated_at": "2023-01-15T01:30:15.01Z"  },  "plain_text_token": "string"}