HTTP POST URL Format
In addition to the regular HTTP GET parameters, you can add HTTP POST payload options to your request that specify intermediate points and priority for road types. The content type must be set to application/json. The following format is used for HTTP POST requests:
HTTP POST:
/webApp-context/services/databases/dbsource.json?q=route&query_parameters
POST BODY: Content-Type:application/json {Route Data}
Route Data is the POST json body (Content-Type: application/json) for the additional route information to be used in the calculation containing ambient speeds for road types.
Intermediate Points
A list of intermediate points to include along the route. To include a set of intermediate points in a HTTP POST request, add the MultiPoint JSON payload indicating the points that the route will include. If intermediate points are specified both in the URL and in the json payload, the json payload is given preference, and the intermediate points in URL are ignored.
Example intermediate points HTTP POST payload.
{
"intermediatePoints": {
"type": "MultiPoint",
"crs": {
"type": "name",
"properties": {
"name": "epsg:4326"
}
},
"coordinates": [[-73.976266, 40.788717], [-73.973562, 40.792193],
[-73.971802, 40.794630]]
}
}
Transient Updates
For more information, see Transient Updates.
Road Type Priority
Option | Description |
---|---|
high | Prefer the road type over other road types. |
medium | Give this road type equal preference with other road types. If no preference is specified for a road type, the default is Medium. |
low | Prefer other road types over this road type. |
avoid | Exclude the road type from routes if possible. It is not always possible to exclude a road type from the travel directions. Depending on the situation, the alternative to an avoided road type may be so poor that the software will choose a route that uses an avoided road type. Also, if the starting or ending point lies along a segment whose road type has been avoided, the software will still use that segment. |
Example road type priority HTTP POST payload.
{
" roadTypesPriority ": {
"RoadType.MajorRoadDenseUrban": "High",
"RoadType.LimitedAccessDenseUrban": "Low",
"RoadType.LimitedAccessRural": "Medium",
"RoadType.PrimaryHighwayUrban": "Avoid"
}
}