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)

Especifique si se incluirá la información de todas las clases de entidad de origen que participan en el dataset de red.

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

Especifique si se incluirá la información de todas las clases de entidad de origen que participan en el dataset de red.

  • true

    Se incluirá información como el nombre, el tipo, el Id. y el esquema para todas las clases de entidad de origen que participen en el dataset de red.

  • false

    No se incluirá la información. Esta es la opción predeterminada.

The default value is false.

token

Utilice este parámetro para especificar un token que proporcione la identidad de un usuario que tenga permisos para acceder al servicio. La página de seguridad y autenticación ofrece más información sobre cómo se puede obtener un token de acceso.

Ejemplo (reemplace <yourToken> por un token válido):
token=<yourToken>

f

Utilice este parámetro para especificar el formato de respuesta. El parámetro puede tener json o pjson como argumentos, por ejemplo, f=json. El valor pjson se utiliza para imprimir la respuesta JSON en un formato Pretty JSON.

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:

Nota:

Dado que la respuesta es muy detallada, los elementos repetidos dentro de la respuesta se abrevian para mayor claridad.


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