Skip To Content
ArcGIS Developer
Dashboard

GP task

  • URL: https://<catalog-url>/<serviceName>/GPServer/<taskName>
  • Version Introduced:10.9.1

Description

The GP task resource represents a single task in a geoprocessing service published using ArcGIS Notebook Server. It provides basic information about the task, including its name and display name. It also provides detailed information about the various input and output parameters exposed by the task. The task parameters vary with each task, and it is not required for a task to have input or output parameters.

GP task supports the following operation

submitJob—Use for asynchronous tasks. Asynchronous means that your application does not wait for the task to finish execution, and the end user can continue using the application.

Request parameters

ParameterDetails
f

The response format. The default format is html.

Values: html | json | pjson

Example usage

https://myOrg.esri.com/arcgis/rest/services/ae34f9eacf09447dbfe562a7a6945b17/GPServer/deployAutomaticNotifications

JSON Response syntax

{
  "itemId":"<itemId of notebook>" 
  "name": "<taskName>",
  "displayName": "<displayName>",
  "description": "<description>",
  "category": "<category>",
  "helpUrl": "<url to notebook item>",
  "executionType": "esriExecutionTypeAsynchronous",
  "parameters": [
        {
          "name": "<paramName1>",
          "dataType": "<dataType1>",
          "displayName": "<displayName1>",
          "description": "<description 1>",
          "direction": "<esriGPParameterDirectionInput|esriGPParameterDirectionOutput>",
          "defaultValue": {
              <defaultValue1>
            },
          "parameterType": "<esriParameterTypeRequired>"
        },
         {
          "name": "<paramName2>",
          "dataType": "<dataType2>",
          "displayName": "<displayName2>",
          "description": "<description 2>",
          "direction": "<esriGPParameterDirectionInput|esriGPParameterDirectionOutput>",
          "defaultValue": {
              <defaultValue2>
            },
          "parameterType": "<esriParameterTypeRequired>"
        },
     {
          "name": "<paramName3>",
          "dataType": "<dataType3>",
          "displayName": "<displayName3>",
          "description": "<description 3>",
          "direction": "<esriGPParameterDirectionInput|esriGPParameterDirectionOutput>",
          "defaultValue": {
              <defaultValue3>
            },
          "parameterType": "<esriParameterTypeRequired>"
        },
    ]
}

JSON Response example

{
  "itemId": "ae74aa9e40714c738874f419f9053713",
  "displayName": "ae74aa9e40714c738874f419f9053713",
  "executionType": "esriExecutionTypeAsynchronous",
  "name": "webtool_sample_notebook",
  "description": "",
  "helpUrl": "https://myportal.domain.com/portal/home/item.html?id=ae74aa9e40714c738874f419f9053713",
  "category": "",
  "parameters": [
        {
          "parameterType": "esriGPParameterTypeRequired",
          "displayName": "Query",
          "defaultValue": "StringInputParameter",
          "dataType": "GPString",
          "name": "StringInputParameter",
          "description": "This is a sample input parameter. ",
          "category": "",
          "direction": "esriGPParameterDirectionInput"
        },
        {
          "parameterType": "esriGPParameterTypeRequired",
          "displayName": "LongIntParameter",
          "defaultValue": 200,
          "dataType": "GPLong",
          "name": "LongIntParameter",
          "description": "Some long value.",
          "category": "",
          "direction": "esriGPParameterDirectionInput"
        },
        {
          "parameterType": "esriGPParameterTypeRequired",
          "displayName": "Output_Features",
          "dataType": "GPFeatureRecordSetLayer",
          "name": "Output_Features",
          "description": "Output Features",
          "category": "",
          "direction": "esriGPParameterDirectionOutput"
        },
        {
          "parameterType": "esriGPParameterTypeRequired",
          "displayName": "OutputString",
          "dataType": "GPString",
          "name": "OutputString",
          "description": "Output string based on some process.",
          "category": "",
          "direction": "esriGPParameterDirectionOutput"
        },
        {
          "parameterType": "esriGPParameterTypeRequired",
          "displayName": "Output_distance",
          "dataType": "GPLong",
          "name": "Output_distance",
          "description": "Output long number.",
          "category": "",
          "direction": "esriGPParameterDirectionOutput"
        }
    ]
}