Admiral

Jobs

Cancel a job

POST
/v1/jobs/{job_id}/cancel

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

job_id*job_id

The job_id path parameter.

Match^job-[0-9a-z]+$

Response Body

application/json

curl -X POST "https://example.com/v1/jobs/string/cancel"
{  "job": {    "id": "string",    "kind": "JOB_KIND_UNSPECIFIED",    "status": "JOB_STATUS_UNSPECIFIED",    "agent_id": "string",    "environment_id": "string",    "run_id": "string",    "assignment_id": "string",    "components": [      "string"    ],    "profile": "string",    "artifact_digest": "string",    "attempt": 0,    "wait_reason": "WAIT_REASON_UNSPECIFIED",    "result": {      "status": "JOB_STATUS_SUCCEEDED",      "message": "string",      "steps": [        {          "component": "string",          "status": "JOB_STATUS_UNSPECIFIED",          "message": "string"        }      ],      "plan": {        "components": [          {            "component": "string",            "changes": [              {                "resource": {                  "api_version": "string",                  "kind": "string",                  "namespace": "string",                  "name": "string"                },                "action": "ACTION_UNSPECIFIED",                "diff_digest": "string"              }            ]          }        ],        "diff_digest": "string"      },      "inventory": [        {          "component": "string",          "resources": [            {              "api_version": "string",              "kind": "string",              "namespace": "string",              "name": "string"            }          ]        }      ]    },    "created_at": "2023-01-15T01:30:15.01Z",    "started_at": "2023-01-15T01:30:15.01Z",    "finished_at": "2023-01-15T01:30:15.01Z"  }}