The /GetToolInfo direct request can only be published using configure routing services dialog box from ArcGIS Enterprise portal website, or publish using publish routing services command line utility. Use the following endpoint to access the /GetToolInfo direct request. The {{folder represents the folder in which the services are being published.
GET https://{{machineName}}/{{serverWebAdaptorName}}/rest/services/{{folderName}}/NetworkAnalysisUtilities/GPServer/GetToolInfo/executeThe 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.
Parameters
| Name | Required | Type | Default | Description |
|---|---|---|---|---|
f | string | The request response format, either | ||
token | string | An access token with the required privileges. | ||
serviceName | string |
| The service name containing the tool. | |
toolName | string |
| The tool name in the geoprocessing service. | |
includeNetworkSourceInfo | boolean |
| Include information of all the source feature classes. |
Required parameters
token
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>"serviceName
Allowed values: async, async, async, async,async, async, sync
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 travel cost matrix analysis.OD Cost Matrix 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
toolName
Allowed values: Find, Solve, Find, Generate, Generate, Solve, Edit
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 valid tool names:
FindforClosest Facilities asyncserviceClosest Facility SolveforLocation Allocation asyncserviceLocation Allocation FindforRoutes asyncserviceRoute GenerateforService Areas asyncserviceService Area SolveforVehicle Routing Problem asyncserviceVRP EditforVehicle Routing Problem syncserviceVRP GenerateforOrigin Destination Cost Matrix asyncserviceOD Cost Matrix
includeNetworkSourceInfo
Specify whether the information of all the source feature classes that participate in the network dataset will be included.
-
true— Information such as the name, type, ID, and the schema for all the source feature classes that participate in the network dataset will be included. -
false— The information will not be included.
Response details
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.
For a list of error codes and details, go to Direct request error codes
You can make a request to the Get operation from the Utilities service using the URL of the following form
https://{{machineName}}/{{serverWebAdaptorName}}/rest/services/Routing/NetworkAnalysisUtilities/GPServer/GetToolInfo/executeUpon successful completion, the service returns the tool info, which contains the network dataset and the service limits for the given tool.
toolInfo
type:string
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 following shows an example of the tool parameter.
Example:
{
"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",
Examples
Get the tool information for an example tool
In this example you will get the tool information for the Solve tool.
POST https://route-api.arcgis.com/arcgis/rest/services/World/Utilities/GPServer/GetToolInfo/execute?serviceName=asyncVRP&toolName=SolveVehicleRoutingProblem HTTP/1.1
Content-Type: application/x-www-form-urlencoded
token=<ACCESS_TOKEN>
&f=json