Hi I have been asked to add a routing service to a json config file for a third party JS app. We don't have a routing service on our AGS/Portal so I think using the one from Esri is the best path at this time.
Looks like that url should be:
https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World
I know that it is going to use AGOL credits but I am not sure how to wire it up to our organization's account.
The json sample the vendor provided is:
"routing": {
"url": "",
"distanceFormat": "esriKilometers"
},
Hi @forestknutsen1,
Is you are going to use JavaScript you can:
The Routing chapter in the Mapping APIs and location services guide has a ton of resources to help you with that, including links to the Routing & Directions API collection in Postman.
So, you can use route.arcgis.com or route-api.arcgis.com, bot are enhanced endpoints and are functionally equivalente (more).
In terms of how to authorize, you have all options available, I would recommend API keys or app credentials, unless the end user of the app has an ArcGIS identity & the app request authentication (types of authentication comparison).
And last but not least, should you use ArcGIS Online?? Maybe, you can also use a free ArcGIS Developer account which is tight to ArcGIS Platform and includes:
More info about differences between account/product types in: Products, subscriptions, and accounts:
I hope this helps.
Cheers!,
Raul