Admiral

Agents

Create an agent

POST
/v1/agents

Scope: agent:write

Authorization

bearerAuth
AuthorizationBearer <token>

An API key, or an access token minted from one. Pass it 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://example.com/v1/agents" \  -H "Content-Type: application/json" \  -d '{    "agent": {}  }'
{  "agent": {    "id": "string",    "name": "string",    "health": "HEALTH_UNSPECIFIED",    "report": {      "agent_version": "string",      "protocol_version": 0,      "runtime": {        "kubernetes": {          "cluster_uid": "string"        }      },      "ambient_credentials": [        {          "source": "SOURCE_UNSPECIFIED",          "location": "string",          "principal": "string"        }      ],      "reported_at": "2023-01-15T01:30:15.01Z",      "infra": {        "engines": [          {            "engine": "INFRA_ENGINE_UNSPECIFIED",            "version": "string"          }        ]      }    },    "created_by": {      "id": "string",      "display_name": "string",      "email": "string"    },    "created_at": "2023-01-15T01:30:15.01Z",    "kind": "KIND_UNSPECIFIED",    "settings": {      "infra": {        "engines": [          {            "engine": "INFRA_ENGINE_UNSPECIFIED",            "versions": "string"          }        ]      }    },    "approval": {      "required_approvals": 0,      "groups": [        {          "group_id": "string",          "approvals": 1        }      ]    },    "allowed_component_ids": [      "string"    ],    "service_account_id": "string"  },  "grants": [    {      "application_id": "string"    }  ],  "enrollment_key": {    "secret": "string",    "expires_at": "2023-01-15T01:30:15.01Z"  }}