FRAMES | NO FRAMES | Description | Parameters | Examples | Result Values |
URL | http://<job-url>/results/<param-name> |
---|---|
Parent Resource | Job |
The GP result resource represents a result parameter for a GP job. It provides information about the result parameter such as its name, data type and value. The value is the most important piece of information provided by this resource. Based on the data type of the parameter, the values provide different types of information. Given this fact, the value will have different structures based on the data type as defined below.
Parameter | Details |
---|---|
f | Description: The
response format. The default response format is html. Values: html | json | image | kmz |
outSR | Description: The well-known ID of the spatial reference of the output geometries. This parameter is applicable for result parameters that contain geometries. This parameter can be used to return the geometries in a spatial reference that is different from the spatial reference in which the outputs were initially created. |
returnType | Description: If
the GP service is associated with a result map service, the default
output for GPRasterDataLayer and GPFeatureSetLayer parameters is a map image. However,
you can explicitly request the raw raster data by using
returnType and setting
its value to data .Values: data |
Example 1: For a Mailing List task job as described in the Job Details doc's Examples section, you can get access to its Report_html
result parameter with the following URL:
http://sampleserver2.arcgisonline.com/ArcGIS/rest/services/Portland/ESRI_CadastralData_Portland/GPServer/MailingList/jobs/jdb4cce48c464424e913c15c4f419b32a/results/Report_html
Note that jdb4cce48c464424e913c15c4f419b32a
is an example Job ID and the Job ID of your job might vary.
{
"paramName" : "<paramName>",
"dataType" : "<dataType>",
"value" : <valueLiteralOrObject>
}
{
"paramName" : "Output_String",
"dataType" : "GPString",
"value" : "TestString"
}
The value
field in the JSON response above can vary based on the data type of the
parameter. For certain data types such as GPFeatureRecordSetLayer and
GPRasterDataLayer, it can vary further based on whether the GP service
is associated with a result map service or not.
These simple data types have parameter values that are their literal values.
{
"paramName" : "<paramName>",
"dataType" : "<GPBoolean | GPDouble | GPLong | GPString>",
"value" : <valueLiteral>
}
{
"paramName" : "Output_Double",
"dataType" : "GPDouble",
"value" : 1234.56
}
The value for GPDate data type is a string with the following format:
dow mon dd hh:mm:ss zzz yyyy
Where:
dow
is the day of the week (Sun, Mon, Tue, Wed, Thu, Fri, Sat
).
mon
is the month (Jan,
Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
). dd
is the day of the month (01
through 31
),
as two decimal digits. hh
is the hour of the day (00
through 23
),
as two decimal digits. mm
is the minute within the hour (00
through 59
),
as two decimal digits. ss
is the second within the minute (00
through 61
,
as two decimal digits. zzz
is the time zone and may reflect daylight saving time. Standard time
zone abbreviations include those recognized by the parse
method.
If time zone information is not available, then zzz
contains no characters at all. yyyy
is the year, as four decimal digits.{
"paramName" : "<paramName>",
"dataType" : "GPDate",
"value" : "<dow mon dd hh:mm:ss zzz yyyy>"
}
{
"paramName" : "Output_Date",
"dataType" : "GPDate",
"value" : "Sun Apr 10 16:00:00 PST 1977"
}
The parameter value for GPLinearUnit is a JSON structure with the following fields.
distance
: a double value.units
: a
string whose values can be "esriMeters"
,
"esriMiles"
, etc.{
"paramName" : "<paramName>",
"dataType" : "GPLinearUnit",
"value" : { "distance" : <distance>, "units" : "<units>" }
}
{
"paramName" : "Output_Linear_Unit",
"dataType" : "GPLinearUnit",
"value" : { "distance" : 1234.56, "units" : "esriMiles" }
}
The
parameter value for GPDataFile is a JSON structure
with a url
field. The value of the url
field is
a URL to the location of the data file.
{
"paramName" : "<paramName>",
"dataType" : "GPDataFile",
"value" : { "url" : "<url>" }
}
{
"paramName" : "Output_File",
"dataType" : "GPDataFile",
"value" :
{
"url" : "http://flame7/arcgisjobs/ByValTools_GPServer/J1E7A1738AC054CDCBFC4A413DD9033CE/scratch/output.txt"
}
}
The parameter value for GPRasterData is a JSON structure with the following fields.
url
: a URL to the location of the raster data file. format
: a string representing the format of the raster.{
"paramName" : "<paramName>",
"dataType" : "GPRasterData",
"value" : { "url" : "<url>", "format" : "<format>" }
}
{
"paramName" : "Output_Raster",
"dataType" : "GPRasterData",
"value" :
{
"url" : "http://flame7/arcgisjobs/ByValTools_GPServer/JD613584CA6AC462AB8229A9A27B3DA79/scratch/slpgrd.tif",
"format" : "tif"
}
}
The
parameter value for GPRecordSet is a JSON
structure with the field features
.
The features
field is an array of features.
Each feature in turn contains an attributes
field. attributes
are key-value pairs
where
the key is a field name in the list of fields of the record set
and the value is the value of the corresponding field.
Note: At 9.3 SP1 an exceededTransferLimit
property was added to the JSON response.
This property will be true
only if the number of records exceeds the maximum number configured by the server administrator.
Otherwise, it will be false
.
{
"paramName" : "<paramName>",
"dataType" : "GPRecordSet",
"value" :
{
"features" : [
{
"attributes" :
{
"<field1>" : <value11>,
"<field2>" : <value12>
}
},
{
"attributes" :
{
"<field1>" : <value21>,
"<field2>" : <value22>
}
}
]
},
"exceededTransferLimit" : false | true
}
{
"paramName" : "Output_Record_Set",
"dataType" : "GPRecordSet",
"value" :
{
"features" : [
{
"attributes" :
{
"TextField" : "a",
"IntField" : 1234,
"DoubleField" : 1234.56,
"DateField" : "Sun Apr 10 16:00:00 PST 1977"
}
},
{
"attributes" :
{
"TextField" : "b",
"IntField" : 5678,
"DoubleField" : 5678.91,
"DateField" : "Mon Apr 11 16:00:00 PST 1977"
}
}
]
},
"exceededTransferLimit" : false
}
Map images can be a result of a GP job. If a GP service is associated with a result map service, the results of GPFeatureRecordSetLayer and GPRasterDataLayer data types can be drawn by the result map service and hence can be provided to the client as a map image.
In
such cases where the result is a map image, the value
field for the GP parameter is a JSON structure with a mapImage
field. The structure of the mapImage
field is a JSON object whose structure is same as that of the JSON
response of the export map operation.
Further, most of the query parameters available for the export map
operation are available for GP map image results as well. The
only exceptions are the layers
and
the transparent
parameters.
The layers
parameter is not available for GP map image results because it exports
the map only for the layer corresponding to the GP parameter.
The transparent
parameter is available,
however, the default value is true
for GP map image results whereas the default value is false
for the export map operation.
{
"paramName" : "<paramName>",
"dataType" : "<GPRasterDataLayer | GPFeatureRecordSetLayer>",
"value" :
{
"mapImage" :
{
"href" : "<href>",
"width" : <width>,
"height" : <height>,
"extent" : {<envelope>},
"scale" : <scale>
}
}
}
{
"paramName" : "Output_Raster_Layer",
"dataType" : "GPRasterDataLayer",
"value" :
{
"mapImage" :
{
"href" : "http://flame7/arcgisoutput/_ags_map40a7f57f31474933a94b5c672b7205f0.png",
"width" : 400,
"height" : 400,
"extent" : {
"xmin" : -109.55, "ymin" : 25.76, "xmax" : -86.39, "ymax" : 49.94,
"spatialReference" : {"wkid" : 4326}
},
"scale" : 2.53E7
}
}
}
If
the GP service is associated with a result map service, the default
output for GPRasterDataLayer parameters is a map
image. However, you can explicitly request the raw
raster data by using the returnType
parameter in the URL and setting its value to data
.
If the GP service is not associated with
a result map service, or if the returnType
parameter is set to the value data
,
the
parameter value for GPRasterDataLayer is a JSON structure with the
following fields.
url
: a URL to the location of the raw raster data.format
: a string representing the format of the raster.{
"paramName" : "<paramName>",
"dataType" : "GPRasterDataLayer",
"value" : { "url" : "<url>", "format" : "<format>" }
}
{
"paramName" : "Output_Raster_Layer",
"dataType" : "GPRasterDataLayer",
"value" :
{
"url" : "http://flame7/arcgisjobs/ByRefTools_GPServer/J3D1737BA4584441FACBD5563AD1A47D5/scratch/outrast.tif",
"format" : "tif"
}
}
If
the GP service is associated with a result map service, the default
output for GPFeatureRecordSetLayer parameters is a map image. However,
you can explicitly request the feature data by
using the returnType
parameter in the URL and
setting its value to data
.
If the GP service is not associated with
a result map service or if the returnType
parameter is set to the value data
,
the parameter value for GPFeatureRecordSetLayer is a
JSON
structure with the following fields.
features
: an array of features.
Each feature contains the fields
geometry
: points, lines or polygons. The structure for the geometries is
same as the structure of the JSON
geometry objects
returned by the ArcGIS REST API.attributes
: key-value pairs
where
the key is a field name in the list of fields of the record set
and the value is the value of the corresponding field.spatialReference
: the well known ID of a spatial reference.geometryType
: the geometry type of the layer.{
"paramName" : "<paramName>",
"dataType" : "GPFeatureRecordSetLayer",
"value" :
{
"geometryType" : "<geometryType>",
"spatialReference" : {<spatialReference>},
"features" : [
{
"geometry" : {<geometry1>},
"attributes" :
{
"<field1>" : <value11>,
"<field2>" : <value12>
}
},
{
"geometry" : {<geometry2>},
"attributes" :
{
"<field1>" : <value21>,
"<field2>" : <value22>
}
}
]
}
}
{
"paramName" : "Output_Features",
"dataType" : "GPFeatureRecordSetLayer",
"value" :
{
"geometryType" : "esriGeometryPoint",
"spatialReference" : {"wkid" : 4326},
"features" : [
{
"geometry" : {"x" : -104.36, "y" : 34.657},
"attributes" :
{
"TextField" : "a",
"IntField" : 1234,
"DoubleField" : 1234.56,
"DateField" : "Sun Apr 10 16:00:00 PST 1977"
}
},
{
"geometry" : {"x" : -114.749, "y" : 31.439},
"attributes" :
{
"TextField" : "b",
"IntField" : 5678,
"DoubleField" : 5678.91,
"DateField" : "Mon Apr 11 16:00:00 PST 1977"
}
}
]
}
}