Admiral
Agents

Retrieve a workload

GET
/api/v1/agents/{agent_id}/workloads/{workload_id}

Scope: agent:read

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

agent_id*agent_id

The agent (cluster) the workload belongs to (UUID).

Formatuuid
workload_id*workload_id

The workload to retrieve (UUID).

Formatuuid

Response Body

application/json

curl -X GET "https://api.admiral.io/api/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/workloads/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "workload": {    "id": "string",    "agent_id": "string",    "namespace": "string",    "name": "string",    "kind": "string",    "labels": {      "property1": "string",      "property2": "string"    },    "health_status": "WORKLOAD_HEALTH_STATUS_UNSPECIFIED",    "status_reason": "string",    "replicas_desired": 0,    "replicas_ready": 0,    "replicas_available": 0,    "cpu_requests_millicores": 0,    "cpu_limits_millicores": 0,    "cpu_used_millicores": 0,    "memory_requests_bytes": 0,    "memory_limits_bytes": 0,    "memory_used_bytes": 0,    "containers": [      {        "name": "string",        "image": "string",        "restart_count": 0,        "state": "string",        "ready": true      }    ],    "last_updated_at": "2023-01-15T01:30:15.01Z",    "uid": "string",    "generation": 0,    "revision_id": "string",    "sync": "SYNC_STATE_UNSPECIFIED",    "suspended": true,    "resources": [      {        "group": "string",        "version": "string",        "kind": "string",        "namespace": "string",        "name": "string",        "sync": "SYNC_STATE_UNSPECIFIED",        "health": "WORKLOAD_HEALTH_STATUS_UNSPECIFIED",        "message": "string",        "field_owners": [          "string"        ]      }    ],    "conditions": [      {        "type": "string",        "status": "string",        "observed_generation": 0,        "reason": "string",        "message": "string",        "last_transition_time": "2023-01-15T01:30:15.01Z"      }    ],    "observed_at": "2023-01-15T01:30:15.01Z",    "last_reconciled_at": "2023-01-15T01:30:15.01Z",    "last_applied_revision": "string"  }}