Skip To Content
ArcGIS Developer
Dashboard

GP Job

  • URL: https://<catalog-url>/<serviceName>/GPServer/<taskname>/jobs/<job-id>
  • Version Introduced:10.9.1

Description

The GP job resource represents a job submitted using the submitJob operation. It provides basic information about the job such as the job ID, status, and messages. Additionally, if the job has successfully completed, it provides information about the result parameters as well as the input parameters.

  • Job ID, as jobId, is a system assigned ID for each job. Each job has a unique ID.
  • Status, as jobStatus, is the current status of the job. It can be any one of the following values: esriJobCancelled, esriJobCancelling, esriJobExecuting, esriJobFailed, esriJobNew, esriJobSucceeded, esriJobTimedOut, esriJobSubmitted, esriJobWaiting, or expectedFailure.
  • Progress, as progress, see the messages bullet.
  • Messages, as messages, allow you to specify whether the messages will be returned to you using returnMessages. To configure the message level, see Show Messages.
  • Output, as results, if any. All result values can be accessed using the GP results resource. The JSON response specifies a relative URL to the result resource with a paramUrl field.
  • Input, as inputs, if any. All input parameter values are accessed using the GP inputs resource. The JSON response specifies a relative URL to the input resource with a paramUrl field.

The job resource supports a cancel job operation. This operation can be used to cancel a job before it's completed. If your geoprocessing service is Python code with no ArcPy functions, the cancellation request will not be fulfilled.

Request parameters

ParameterDetails
f

The response format. The default response format is html.

Values: html | json | kmz

JSON Response syntax

JSON response syntax

{
    "jobId": "<jobId>",
    "jobStatus": "<jobStatus>",
    "results": {
        "<param1>": {
            "paramUrl": "<relativeUrlToParam1>"
        },
        "<param2>": {
            "paramUrl": "<relativeUrlToParam2>"
        }
    },
    "inputs": {
        "<param1>": {
            "paramUrl": "<relativeUrlToParam1>"
        },
        "<param2>": {
            "paramUrl": "<relativeUrlToParam2>"
        }
    },
    "messages": [
        {
            "type": "<type1>",
            "description": "<description1>"
        },
        {
            "type": "<type2>",
            "description": "<description2>"
        }
    ]
}

JSON Response example

{
    "jobId": "jb5411e02-6281-41e6-b50b-89a04704027a",
    "jobStatus": "esriJobSucceeded",
    "inputs": {
        "patient_locations": {"paramUrl": "inputs/patient_locations"},
        "city_candidates": {"paramUrl": "inputs/city_candidates"},
        "als_clinics": {"paramUrl": "inputs/als_clinics"},
        "drive_times": {"paramUrl": "inputs/drive_times"}
    },
    "messages": [
        "Input Notebook Path:  /arcgis/home/.tasks/jb5411e02-6281-41e6-b50b-89a04704027a/f2537108aac44d1b8562c12c1badd97e.ipynb",
        "Output Notebook Path:  /arcgis/home/.tasks/jb5411e02-6281-41e6-b50b-89a04704027a/output.ipynb",
        "Start processing time: 2021-09-28 20:20:56.597478",
        "Finish processing time: 2021-09-28 20:22:06.739537",
        "Successfully completed."
    ],
    "startTime": 1632860453372,
    "endTime": 1632860531980,
    "type": "executeNotebookAsWebTool",
    "results": {
        "containerConfigStoreId": "c6f216b2c9524e0f80ae37341e89b032",
        "result_facilities": {"paramUrl": "results/result_facilities"},
        "outputPreview": {"paramUrl": "results/outputPreview"}
    },
    "status": "COMPLETED",
    "username": "agstest@AVWORLD",
    "customAttributes": {
        "isCancelled": false,
        "webToolParameters": "[{\"parameterType\":\"esriGPParameterTypeRequired\",\"displayName\":\"ALS Clinics\",\"defaultValue\":{\"url\":\"https://mynotebookserver.esri.com/server/rest/services/Hosted/ALS_Clinics_CA/FeatureServer/0\"},\"dataType\":\"GPFeatureRecordSetLayer\",\"name\":\"als_clinics\",\"description\":\"test\",\"category\":\"\",\"direction\":\"esriGPParameterDirectionInput\"}]"
    }
}