Admiral

Agents

Rename an agent

POST
/v1/agents/{agent}/rename
  • ALREADY_EXISTS when another agent has the new name.
    • ABORTED when etag is set and the agent changed since it was read.

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

Path Parameters

agent*string

The agent id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

RenameAgentRequest gives an agent a new name.

Response Body

application/json

curl -X POST "https://example.com/v1/agents/string/rename" \  -H "Content-Type: application/json" \  -d '{    "new_name": "string"  }'
{  "agent": {    "id": "string",    "name": "string",    "display_name": "string",    "resource_name": "string",    "kind": "AGENT_KIND_UNSPECIFIED",    "settings": {      "infra": {        "engines": [          {            "engine": "ENGINE_UNSPECIFIED",            "versions": "string"          }        ]      }    },    "approval": {      "required_approvals": 0,      "groups": [        {          "group_id": "string",          "approvals": 1        }      ]    },    "allowed_component_ids": [      "string"    ],    "service_account_id": "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": "ENGINE_UNSPECIFIED",            "version": "string"          }        ]      }    },    "etag": "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"  }}