Skip To Content
ArcGIS Developer
Dashboard

Utilities/GetToolInfo operation

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, GetTravelModes and GetToolInfo. The GetToolInfo 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 GetToolInfo operation from the Utilities service using the URL of the following form:

https://route.arcgis.com/arcgis/rest/services/World/Utilities/GPServer/GetToolInfo/execute?parameters

Request paramters

The GetToolInfo operation takes serviceName, toolName, 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:

  • asyncClosestFacility—The job request of the geoprocessing service used to perform the closest facility analysis.
  • asyncLocationAllocation—The job request of the geoprocessing service used to perform the location-allocation analysis.
  • asyncRoute—The job request of the geoprocessing service used to perform the route analysis.
  • asyncServiceArea—The job request of the geoprocessing service used to perform the service area analysis.
  • asyncVRP—The job request of the geoprocessing service used to perform the fleet routing analysis.
  • syncVRP—The direct request of the geoprocessing service used to perform the fleet routing analysis.
  • asyncODCostMatrix—The job request of the geoprocessing service used to perform the travel cost matrix analysis.

The default value is asyncRoute.

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 serviceName parameter. Valid tool names are:

  • FindClosestFacilities for asyncClosestFacility service
  • SolveLocationAllocation for asyncLocationAllocation service
  • FindRoutes for Route service
  • GenerateServiceAreas for asyncServiceArea service
  • SolveVehicleRoutingProblem for asyncVRP service
  • EditVehicleRoutingProblem for syncVRP service
  • GenerateOriginDestinationCostMatrix for asyncODCostMatrix service

The default value is FindRoutes.

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 on how such an access token can be obtained.

Example (replace <yourToken> with a valid token):
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 pretty format.

JSON response

The request to the GetToolInfo operation returns a JSON response that contains any warning messages from the service execution as well a value for the output parameter toolInfo. If the request fails to execute, the response only contains the error property that contains the error messages.

JSON Response Syntax for successful request
{
    "results": [
        {
            "paramName": "<paramName1>",
            "dataType": "<dataType1>",
            "value": <valueLiteralOrObject1>
        }
    ],
    "messages": [
        {
            "type": "<type1>",
            "description": "<description1>"
        },
        {
            "type": "<type2>",
            "description": "<description2>"
        }
    ]
}
JSON response syntax for failed request.
{
    "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 supportedTravelModes 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 toolInfo parameter.

Note:

Because the response is quite verbose, the repeated elements within the response are abbreviated for clarity.

{
  "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

Note:

If you copy and paste the request URL from the examples into a web browser, you will get an invalid token error message. You need to replace <yourToken> with a valid token. Learn how to generate one.

Getting the tool info for an example tool

In this example you will get the tool info for the SolveVehicleRoutingProblem tool.

Request URL to execute the GetToolInfo operation

https://route.arcgis.com/arcgis/rest/services/World/Utilities/GPServer/GetToolInfo/execute?serviceName=asyncVRP&toolName=SolveVehicleRoutingProblem&f=pjson&token=<yourToken>

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": []
}