Utilities/GetToolInfo Tool

The Utilities service contains tools that provide auxiliary information for working with network analysis services available with ArcGIS Online. Currently, the Utilities service contains two tools, GetTravelModes and GetToolInfo. The GetToolInfo tool provides additional information such as the description of the network dataset used for the analysis and execution limits for a tool available in the geoprocessing service.

Request URL

You can make a request to the GetToolInfo tool from the Utilities service using the URL of the following form:

http://logistics.arcgis.com/arcgis/rest/services/World/Utilities/GPServer/GetToolInfo/execute?parameters

Request Parameters

The GetToolInfo request takes serviceName and toolName parameters which are both required.

Required Parameters

token

Use this parameter to specify a token that provides the identity of a user that has the permissions to access the service. Accessing services provided by Esri provides more information on how such an access token can be obtained.

f

Use this parameter to specify the response format. Choose either json or pjson, for example, f=json. The pjson value is used for printing the JSON response in a pretty format.

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 asynchronous geoprocessing service used to perform the closest facility analysis.
  • asyncLocationAllocation - The asynchronous geoprocessing service used to perform the location-allocation analysis.
  • asyncRoute - The asynchronous geoprocessing service used to perform the route analysis.
  • asyncServiceArea - The asynchronous geoprocessing service used to perform the service area analysis.
  • asyncVRP - The asynchronous geoprocessing service used to perform the vehicle routing problem analysis.
  • syncVRP - The synchronous geoprocessing service used to perform the vehicle routing problem analysis.
  • asyncODCostMatrix - The asynchronous geoprocessing service used to perform the origin destination 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.

JSON Response

The request to the GetToolInfo tool 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 execution 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.

NoteNote:

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

NoteNote:

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. See Accessing services provided by Esri to see 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 tool

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

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": []
}
9/13/2017