Admiral
Agents

List workloads

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

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) whose workloads to list (UUID).

Formatuuid

Query Parameters

filter?filter

Filter expression to narrow results. Uses the Admiral filter DSL (see the API documentation for the full operator and predicate reference).

Filterable fields:

  • namespace: filter by Kubernetes namespace.
  • kind: filter by workload kind (Deployment, StatefulSet, DaemonSet).
  • name: filter by workload name.
  • health_status: filter by workload health status.
Lengthlength <= 1024
page_size?page_size

Maximum number of workloads to return per page. Defaults to 50 when omitted or 0; must not exceed 100.

Formatint32
Range0 <= value <= 100
page_token?page_token

Opaque pagination token from a previous response.

Response Body

application/json

curl -X GET "https://api.admiral.io/api/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/workloads"
{  "workloads": [    {      "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"    }  ],  "next_page_token": "string"}