The Create Route Layers task creates route layer items on the portal from the input route data.
A route layer includes all the information for a particular route such as the stops assigned to the route as well as the travel directions. Creating route layers is useful if you want to share individual routes with other members in your organization.
Route data is a storage format used to describe the results of a network analysis and can be created in applications such as ArcGIS Pro.
Limits
The maximum number of route layers that can be created is 1.000. If the input route data contains more than 1.000 routes, the task will fail with an error message.
Request URL
http://<analysis url>/CreateRouteLayers/submitJob
Request parameters
Parameter | Details |
---|---|
routeData (Required) | The item id for the route data item that is used to create route layer items. Before running this task, the route data must be added to your portal as an item. Syntax:
|
deleteRouteData (Required) | Indicates if the input route data item should be deleted. You may want to delete the route data in case it is no longer required after the route layers have been created from it. When deleteRouteData is set to true and the task fails to delete the route data item, it will return a warning message but still continue execution. The default value is false. Example
Values: true | false |
outputName (Required) | Specify properties such as the title, tags, snippet, and the portal folder for the output route layer items.
Syntax
Example
|
context |
Context contains additional settings that affect task execution. Currently, Create Route Layers does not honor any settings passed as part of context. |
f | The response format. The default response format is html. Values: html | json | pjson |
Response
When you submit a request, the service assigns a unique job ID for the transaction.
Syntax
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}
After the initial
request is submitted you can use the
jobId to periodically check the status of the job and messages as described in the topic Checking job status.
Once the job has successfully completed, you use
the jobId to retrieve the results. To track the status, you can make a request of the following form:http://<analysis url>/CreateRouteLayers/jobs/<jobId>
Accessing results
When the status of the job request is esriJobSucceded, you can access the results of the analysis by making a request of the following form.
http://<analysis url>/CreateRouteLayers/jobs/<jobId>/results/<output parameter name>?token=<your token>&f=json
Parameter | Description |
---|---|
routeLayers | The output route layer items. Example The result has properties for parameter name, data type, and value. The contents of value include the item ids of the output route layers as well as some additional properties such as the URL for the route layer items. Syntax
|