Cancel a job

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

Description

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

ParameterDetails

f

(Optional)

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.

1
https://machine.domain.com/webadaptor/rest/services/911CallsHotspot/GPServer/911%20Calls%20Hotspot/jobs/j8279ff17f3b348ddadb6c092cfb7e7ba/cancel?f=json

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.

1
2
3
4
{
    "jobId" : "<jobId>",
    "jobStatus" : "<jobStatus>"
}

JSON Response example

A job with an ID of j3ba49f5bb25343679c9f20705d643e54 is being cancelled.

1
2
3
4
{
    "jobId":"j3ba49f5bb25343679c9f20705d643e54",
    "jobStatus":"esriJobCancelling"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close