FRAMES | NO FRAMES Description | Parameters | Examples | Response
GP Task
URL http://<gpservice-url>/<taskName>
Supported Operations Execute Task  Submit Job  
Parent Resource GP Service
Child Resources Job  

Description

The GP task resource represents a single task in a GP service published using the ArcGIS 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 GP task supports two operations:

Resource Hierarchy

Map

Parameters

Parameter Details
f Description: The response format. The default response format is html.

Values: html | json

Example Usage

Example 1: URL for the CreateDriveTimePolygons task for "ESRI_DriveTime_US" on sampleserver1.

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Network/ESRI_DriveTime_US/GPServer/CreateDriveTimePolygons

JSON Response Syntax

Note: The executionType property was added to the JSON response at 9.3 SP1.

{
    "name": "<taskName>",
    "displayName": "<displayName>",
	"description": "<description>", //Added at 10.1 SP1
    "category": "<category>",
    "helpUrl": "<url>",
    "executionType": "<executionType>",
    "parameters": [
        {
            "name": "<paramName1>",
            "dataType": "<dataType1>",
            "displayName": "<displayName1>",
			"description": "<description>", //Added at 10.1 SP1
            "direction": "<direction1>",
            "defaultValue": {
                <defaultValue1>
            },
            "parameterType": "<parameterType1>",
            "category": "<paramCategory1>",
            "choiceList": [
                "choice11",
                "choice12"
            ]
        },
        {
            "name": "<paramName2>",
            "dataType": "<GPFeatureRecordSetLayer | GPRecordSet>",
            "displayName": "<displayName2>",
			"description": "<description>", //Added at 10.1 SP1
            "direction": "<direction2>",
            "defaultValue": {
                "geometryType": "<geometryType2>",
                "hasZ": <true|false>, //Added at 10.1
                "hasM": <true|false>, //Added at 10.1
                "spatialReference": {
                    <spatialReference>
                },
                "fields": [
                    {
                        "name": "<fieldName21>",
                        "type": "<fieldType21>"
                    },
                    {
                        "name": "<fieldName22>",
                        "type": "<fieldType22>"
                    }
                ] 
            },
            "parameterType": "<parameterType2>",
            "category": "<paramCategory2>",
            "choiceList": [
                "choice21",
                "choice22"
            ]
        }
    ]
}

JSON Response Example

{
"name" : "BufferPoints",
"displayName" : "BufferPoints",
"category" : "",
"helpUrl" : "http://flame7/arcgisoutput/BufferByVal/BufferPoints.htm",
"executionType": "esriExecutionTypeAsynchronous",
"parameters": [
{
"name" : "Input_Points",
"dataType" : "GPFeatureRecordSetLayer",
"displayName" : "Input Points",
"direction" : "esriGPParameterDirectionInput",
"defaultValue" : {
"geometryType" : "esriGeometryPoint",
"hasZ" : true,
"spatialReference" : {"wkid" : 4326},
"fields" : [
{"name" : "FID", "type" : "esriFieldTypeOID"},
{"name" : "Shape", "type" : "esriFieldTypeGeometry"},
{"name" : "Id", "type" : "esriFieldTypeInteger"}
]
},
"parameterType" : "esriGPParameterTypeRequired",
"category" : "",
"choiceList" : []
},
{
"name" : "Distance",
"dataType" : "GPLinearUnit",
"displayName" : "Distance",
"direction" : "esriGPParameterDirectionInput",
"defaultValue" : { "distance" : 100.0, "units" : "esriMiles"},
"parameterType" : "esriGPParameterTypeRequired",
"category" : "",
"choiceList" : []
},
{
"name" : "Input_Points_By_Ref",
"dataType" : "GPString",
"displayName" : "Input Points By Ref",
"direction" : "esriGPParameterDirectionInput",
"defaultValue" : "fourptsinacol",
"parameterType" : "esriGPParameterTypeRequired",
"category" : "",
"choiceList" : [
"fourptsinacol","fourptsinarow","partiallines","line_shp","partialpolys","polygon_shp"
]
},
{
"name" : "Output_Buffered_Points",
"dataType" : "GPFeatureRecordSetLayer",
"displayName" : "Output Buffered Points",
"direction" : "esriGPParameterDirectionOutput",
"defaultValue" : {
"geometryType" : "esriGeometryPoint",
"hasZ" : true,
"spatialReference" : {"wkid" : 4326},
"fields" : [
{"name" : "FID", "type" : "esriFieldTypeOID"},
{"name" : "Shape", "type" : "esriFieldTypeGeometry"},
{"name" : "Id", "type" : "esriFieldTypeInteger"}
{"name" : "Name", "type" : "esriFieldTypeString"}
  ]
},
"parameterType" : "esriGPParameterTypeRequired",
"category" : "",
"choiceList" : []
}
]
}