Skip To Content
ArcGIS Developer

Cancel a job

  • URL:https://<task-url>/jobs/<job-id>/cancel
  • Version Introduced:10.0


The cancel operation is performed on an asynchronous jobs resource. This operation results in the cancellation of a running geoprocessing job. You can provide an argument to the cancel operation as defined in the following parameters table. The job will have a canceling (esriJobCancelling) status with this operation, and a canceled (esriJobCancelled) status when the job is canceled.

Request parameters


Description: The response format. The default response format is html.

Values: html | json

You can cancel a job that is in waiting (esriJobWaiting) or running (esriJobExecuting) status. Canceling a canceled (esriJobCancelled), succeeded (esriJobSucceeded), failed (esriJobFailed), or timed out (esriJobTimedOut) job status will return an Invalid or missing input parameters error. If the cancellation request is submitted for a job with a submitted status (esriJobSumbitted) before the job starts to run, you will receive the same error, and the job will continue to run.

Example usage

Cancel the job with an ID of j8279ff17f3b348ddadb6c092cfb7e7ba and expecting a JSON response.

JSON Response syntax

The syntax of a job cancellation request. The request comes with the jobId and a status. Typically, the status will be esriJobCancelling.

    "jobId" : "<jobId>",
    "jobStatus" : "<jobStatus>"

JSON Response example

A job with an ID of j3ba49f5bb25343679c9f20705d643e54 is being cancelled.