Admiral

Agents

List jobs

GET
/v1/agents/{agent}/jobs

Scope: agent:read

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.

Query Parameters

page_size?page_size

The page_size query parameter.

Formatint32
Range0 <= value <= 100
page_token?page_token

The page_token query parameter.

filter?filter

An AIP-160 filter expression. Filterable fields are status, kind, agent_id and environment_id.

Example: status = QUEUED AND agent_id = "agt-01jb2f9h6t0c"

id is filterable too: id = "a" OR id = "b" reads up to 100 of them by id in one call.

Lengthlength <= 4096
order_by?order_by

Fields to order by, in AIP-132 syntax such as created_at desc. Accepted fields: created_at. Left empty, the list keeps the order stated above. An unknown field is INVALID_ARGUMENT.

Lengthlength <= 256

Response Body

application/json

curl -X GET "https://example.com/v1/agents/string/jobs"
{  "jobs": [    {      "id": "string",      "resource_name": "string",      "environment_id": "string",      "run_id": "string",      "agent_id": "string",      "kind": "JOB_KIND_UNSPECIFIED",      "artifact_digest": "string",      "components": [        "string"      ],      "deferred_components": [        "string"      ],      "assignment_id": "string",      "status": "JOB_STATUS_UNSPECIFIED",      "wait_reason": "WAIT_REASON_UNSPECIFIED",      "attempt": 0,      "result": {        "status": "SUCCEEDED",        "status_reason": "string",        "steps": [          {            "component": "string",            "status": "JOB_STATUS_UNSPECIFIED",            "status_reason": "string",            "failure": "FAILURE_UNSPECIFIED"          }        ],        "plan": {          "components": [            {              "component": "string",              "changes": [                {                  "resource": {                    "kubernetes": {                      "api_version": "string",                      "kind": "string",                      "namespace": "string",                      "name": "string"                    }                  },                  "action": "ACTION_UNSPECIFIED",                  "diff_digest": "string"                }              ],              "plan_file_digest": "string",              "deferred": {                "pending_inputs": [                  {                    "path": {                      "segments": [                        {                          "key": "string"                        }                      ],                      "display": "string"                    },                    "component": "string",                    "output": "string"                  }                ]              }            }          ],          "diff_digest": "string"        },        "inventories": [          {            "component": "string",            "resources": [              {                "kubernetes": {                  "api_version": "string",                  "kind": "string",                  "namespace": "string",                  "name": "string"                }              }            ]          }        ],        "outputs": [          {            "component": "string",            "outputs": [              {                "name": "string",                "value": null,                "sensitive": true              }            ]          }        ],        "hooks": [          {            "name": "string",            "phase": "PHASE_UNSPECIFIED",            "component": "string",            "passed": true,            "exit_code": 0,            "summary": "string",            "findings": [              {                "message": "string",                "location": "string"              }            ],            "log_offset": "string"          }        ]      },      "started_at": "2023-01-15T01:30:15.01Z",      "finished_at": "2023-01-15T01:30:15.01Z",      "created_at": "2023-01-15T01:30:15.01Z"    }  ],  "next_page_token": "string"}