The Utilities service contains operations that provide auxiliary information for working with routing services available with ArcGIS Online. Currently, the Utilities service contains two operations, Get
and Get
. The Get
operation provides additional information such as the description of the network dataset used for the analysis and execution limits for an operation available as part of the routing services.
Request URL
You can make a request to the Get
operation from the Utilities service using the URL of the following form:
https
Request parameters
The Get
operation takes service
, tool
, token
, and f
.
Required parameters
serviceName
Specify the service name containing the tool. The parameter value should be specified using one of the following keywords that reference a particular geoprocessing service:
async
—The job request of the geoprocessing service used to perform the closest facility analysis.Closest Facility async
—The job request of the geoprocessing service used to perform the location-allocation analysis.Location Allocation async
—The job request of the geoprocessing service used to perform the route analysis.Route async
—The job request of the geoprocessing service used to perform the service area analysis.Service Area async
—The job request of the geoprocessing service used to perform the fleet routing analysis.VRP sync
—The direct request of the geoprocessing service used to perform the fleet routing analysis.VRP async
—The job request of the geoprocessing service used to perform the travel cost matrix analysis.OD Cost Matrix
The default value is async
.
toolName
Specify the tool name in the geoprocessing service. The parameter value should be a valid tool name in the geoprocessing service specified by the service
parameter. The following are the v alid tool names:
Find
forClosest Facilities async
serviceClosest Facility Solve
forLocation Allocation async
serviceLocation Allocation Find
forRoutes Route
serviceGenerate
forService Areas async
serviceService Area Solve
forVehicle Routing Problem async
serviceVRP Edit
forVehicle Routing Problem sync
serviceVRP Generate
forOrigin Destination Cost Matrix async
serviceOD Cost Matrix
The default value is Find
.
token
Use this parameter to specify a token that provides the identity of a user that has the permissions to access the service. The security and authentication page provides more information about how an access token can be obtained.
token=<yourToken>
f
Use this parameter to specify the response format. The parameter can have json
or pjson
as arguments, for example, f=json
. The pjson
value is used for printing the JSON response in a prettified format.
JSON response
The request to the Get
operation returns a JSON response that contains any warning messages from the service execution as well a value for the output parameter tool
. If the request fails to execute, the response only contains the error
property that contains the error messages.
{
"results": [
{
"paramName": "<paramName1>",
"dataType": "<dataType1>",
"value": <valueLiteralOrObject1>
}
],
"messages": [
{
"type": "<type1>",
"description": "<description1>"
},
{
"type": "<type2>",
"description": "<description2>"
}
]
}
{
"error": {
"code": <code>,
"message": "<message>",
"details": [
"<details>"
]
}
}
Output parameters
Upon successful execution, the service returns the tool info, which contains the network dataset and the service limits for the given tool.
toolInfo
Use this parameter to a get a description of the network dataset used for the analysis and service limits for a tool available in the geoprocessing service.
The supported
parameter is returned as a JSON feature set with following syntax:
{
"paramName": "toolInfo",
"dataType": "GPRecoGPStringrdSet",
"value": {
"networkDataset": {
"attributeParameterValues": [
{
"attributeName": "<field1AttributeName>",
"parameterName": "<field1ParameterName>",
"parameterType": "<field1Type>",
"value": ": "<field1Value>"
},
{
"attributeName": "<field2AttributeName>",
"parameterName": "<field2ParameterName>",
"parameterType": "<field2Type>",
"value": ": "<field2Value>"
}
],
"networkAttributes": [
{
"dataType": "<field1DataType>",
"name": "<field1Name>",
"parameterNames": "<field1ParameterNames>",
"restrictionUsageParameterName": "<field1RestrictionUsageParameterName>",
"trafficSupport": <trafficSupport1Value>,
"units": <field1Units>,
"usageType": <field1UsageType>
},
{
"dataType": "<field2DataType>",
"name": "<field2Name>",
"parameterNames": "<field2ParameterNames>",
"restrictionUsageParameterName": "<field2RestrictionUsageParameterName>",
"trafficSupport": <trafficSupport2Value>,
"units": <field2Units>,
"usageType": <field2UsageType>
}
],
"trafficSupport": <value>,
"serviceLimits": {
"<field1>": <value11>,
"<field2>": <value12>
}
}
}
The following shows an example of the tool
parameter.
{
"paramName": "toolInfo",
"dataType": "GPString",
"value": {
"networkDataset": {
"attributeParameterValues": [
{
"attributeName": "Avoid Limited Access Roads",
"parameterName": "Restriction Usage",
"parameterType": "Double",
"value": "AVOID_MEDIUM"
},
{
"attributeName": "Avoid Ferries",
"parameterName": "Restriction Usage",
"parameterType": "Double",
"value": "AVOID_MEDIUM"
},
{
"attributeName": "Avoid Unpaved Roads",
"parameterName": "Restriction Usage",
"parameterType": "Double",
"value": "AVOID_HIGH"
} //... additional attributeParameterValues
],
"networkAttributes": [
{
"dataType": "Integer",
"name": "Hierarchy",
"parameterNames": [],
"restrictionUsageParameterName": null,
"trafficSupport": "NONE",
"units": "Unknown",
"usageType": "Hierarchy"
},
{
"dataType": "Double",
"name": "Minutes",
"parameterNames": [],
"restrictionUsageParameterName": null,
"trafficSupport": "NONE",
"units": "Minutes",
"usageType": "Cost"
},
{
"dataType": "Integer",
"name": "RoadClass",
"parameterNames": [],
"restrictionUsageParameterName": null,
"trafficSupport": "NONE",
"units": "Unknown",
"usageType": "Descriptor"
} // ... additional networkAttributes
],
"trafficSupport": "HISTORICAL_AND_LIVE"
},
"serviceLimits": {
"forceHierarchyBeyondDistance": 50.0,
"forceHierarchyBeyondDistanceUnits": "Miles",
"maximumFeaturesAffectedByLineBarriers": 500.0,
"maximumFeaturesAffectedByPointBarriers": 250.0,
"maximumFeaturesAffectedByPolygonBarriers": 2000.0,
"maximumStops": 10000.0,
"maximumStopsPerRoute": 150.0
}
}
}
Examples
Getting the tool information for an example tool
In this example you will get the tool info rmation for the Solve
tool.
Request URL to execute the GetToolInfo operation
|
JSON response
{
"results": [{
"paramName": "toolInfo",
"dataType": "GPString",
"value": {
"networkDataset": {
"attributeParameterValues": [
{
"attributeName": "Avoid Limited Access Roads",
"parameterName": "Restriction Usage",
"parameterType": "Double",
"value": "AVOID_MEDIUM"
},
{
"attributeName": "Avoid Ferries",
"parameterName": "Restriction Usage",
"parameterType": "Double",
"value": "AVOID_MEDIUM"
},
{
"attributeName": "Avoid Unpaved Roads",
"parameterName": "Restriction Usage",
"parameterType": "Double",
"value": "AVOID_HIGH"
} // ...additional attributeParameterValues
],
"networkAttributes": [
{
"dataType": "Double",
"name": "Minutes",
"parameterNames": [],
"restrictionUsageParameterName": null,
"trafficSupport": "NONE",
"units": "Minutes",
"usageType": "Cost"
},
{
"dataType": "Integer",
"name": "RoadClass",
"parameterNames": [],
"restrictionUsageParameterName": null,
"trafficSupport": "NONE",
"units": "Unknown",
"usageType": "Descriptor"
},
{
"dataType": "Integer",
"name": "TimeZoneID",
"parameterNames": [],
"restrictionUsageParameterName": null,
"trafficSupport": "NONE",
"units": "Unknown",
"usageType": "Descriptor"
} // ...additional networkAttributes
],
"trafficSupport": "HISTORICAL_AND_LIVE"
},
"serviceLimits": {
"forceHierarchyBeyondDistance": 50.0,
"forceHierarchyBeyondDistanceUnits": "Miles",
"maximumFeaturesAffectedByLineBarriers": 500.0,
"maximumFeaturesAffectedByPointBarriers": 250.0,
"maximumFeaturesAffectedByPolygonBarriers": 2000.0,
"maximumOrders": 2000.0,
"maximumOrdersPerRoute": 200.0,
"maximumRoutes": 100.0
}
}
}],
"messages": []
}