Skip to content

Cancel Job Invocation

post/v2/apps/{app_id}/job-invocations/{job_invocation_id}/cancel

Cancel a specific job invocation for an app.

Path ParametersExpand Collapse
app_id: string
job_invocation_id: string
Query ParametersExpand Collapse
job_name: optional string

The job name to list job invocations for.

ReturnsExpand Collapse
id: optional string
completed_at: optional string
formatdate-time
created_at: optional string
formatdate-time
deployment_id: optional string
job_name: optional string
phase: optional "UNKNOWN" or "PENDING" or "RUNNING" or 4 more

The phase of the job invocation

Accepts one of the following:
"UNKNOWN"
"PENDING"
"RUNNING"
"SUCCEEDED"
"FAILED"
"CANCELED"
"SKIPPED"
started_at: optional string
formatdate-time
trigger: optional object { manual, scheduled, type }
manual: optional object { user }

Details about the manual trigger, if applicable

user: optional object { email, full_name, uuid }

The user who triggered the job

email: optional string
formatemail
full_name: optional string
uuid: optional string
scheduled: optional object { schedule }

The schedule for the job

schedule: optional object { cron, time_zone }
cron: optional string

The cron expression defining the schedule

time_zone: optional string

The time zone for the schedule

type: optional "MANUAL" or "SCHEDULE" or "UNKNOWN"

The type of trigger that initiated the job invocation.

Accepts one of the following:
"MANUAL"
"SCHEDULE"
"UNKNOWN"
Cancel Job Invocation
curl https://api.digitalocean.com/v2/apps/$APP_ID/job-invocations/$JOB_INVOCATION_ID/cancel \
    -X POST \
    -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN"
{
  "job_invocation": [
    {
      "id": "ba32b134-569c-4c0c-ba02-8ffdb0492ece",
      "job_name": "good-job",
      "deployment_id": "c020763f-ddb7-4112-a0df-7f01c69fc00b",
      "phase": "SUCCEEDED",
      "created_at": "2025-09-11T11:04:05Z",
      "started_at": "2025-09-11T11:04:10Z",
      "completed_at": "2025-09-11T11:04:40Z",
      "trigger": [
        {
          "type": "SCHEDULED",
          "scheduled": [
            {
              "schedule": {
                "cron": "*/2 * * * *",
                "time_zone": "UTC"
              }
            }
          ]
        }
      ]
    }
  ]
}
Returns Examples
{
  "job_invocation": [
    {
      "id": "ba32b134-569c-4c0c-ba02-8ffdb0492ece",
      "job_name": "good-job",
      "deployment_id": "c020763f-ddb7-4112-a0df-7f01c69fc00b",
      "phase": "SUCCEEDED",
      "created_at": "2025-09-11T11:04:05Z",
      "started_at": "2025-09-11T11:04:10Z",
      "completed_at": "2025-09-11T11:04:40Z",
      "trigger": [
        {
          "type": "SCHEDULED",
          "scheduled": [
            {
              "schedule": {
                "cron": "*/2 * * * *",
                "time_zone": "UTC"
              }
            }
          ]
        }
      ]
    }
  ]
}