GP task

URL:
https://<catalog-url>/<serviceName>/GPServer/<taskName>
Methods:
GET
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

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

JSON Response syntax

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
  "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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
  "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"
        }
    ]
}

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