Skip To Content

GetToolInfo tool

Description

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

Request parameters

ParameterDescription
serviceName

(Required)

Specify the service name containing the tool.

toolName

(Required)

Specify the tool name in the geoprocessing service.

token

(Required)

Provide the identity of a user who has the necessary permissions to access the service.

f

(Required)

The response value. The default value is html.

Values: html | json | pjson

includeNetworkSourceInfo

(Optional)

Specify whether the information of all the source feature classes that participate in the network dataset will be included.

The default value is false.

Values: true | false

Required parameters

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

serviceName

Specify the service name containing the tool. Use one of the following keywords that reference a particular geoprocessing service in the parameter value:

  • 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. Use a valid tool name in the geoprocessing service specified by the serviceName parameter. The following are valid tool names:

  • FindClosestFacilities for the asyncClosestFacility service
  • SolveLocationAllocation for the asyncLocationAllocation service
  • FindRoutes for the Route service
  • GenerateServiceAreas for the asyncServiceArea service
  • SolveVehicleRoutingProblem for the asyncVRP service
  • EditVehicleRoutingProblem for the syncVRP service
  • GenerateOriginDestinationCostMatrix for the asyncODCostMatrix service
The default value is FindRoutes.

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. This is the default.

The default value is false.

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.

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.

Output parameters

Upon successful completion, the service returns the tool information, which contains the network dataset and the service limits for the tool.

toolInfo

Use this parameter to a get a description of the network dataset used for the analysis and processing limits for a tool available in the geoprocessing service.

Syntax example for toolInfo

The toolInfo parameter is returned as a JSON feature set with the 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>
    }
  }
}

Example for toolInfo

The following is 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"
        }
      ],
      "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"
        }
      ],
      "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
    }
  }
}

Example usage

Below is a sample request URL that demonstrates how to get to the GetToolInfo tool from the Utilities service using the URL in the following form:

https://<gpservice-url>/GetToolInfo/execute?parameters

This example demonstrates how to get the tool info for the SolveVehicleRoutingProblem tool.

GetToolInfo request example

https://<gpservice-url>/GetToolInfo/execute?serviceName=asyncVRP&toolName=SolveVehicleRoutingProblem&f=pjson&token=<yourToken>

JSON Response syntax

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

JSON Response syntax for successful requests


{
  "results": [
    {
      "paramName": "<paramName1>",
      "dataType": "<dataType1>",
      "value": <valueLiteralOrObject1>
    }
  ],
  "messages": [
    {
      "type": "<type1>",
      "description": "<description1>"
    },
    {
      "type": "<type2>",
      "description": "<description2>"
    }
  ]
}

JSON Response syntax for failed requests


{
  "error": {
    "code": <code>,
    "message": "<message>",
    "details": [
      "<details>"
    ]
  }
}

JSON Response example


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