HTTP POST URL Format
The following format is used for HTTP POST requests. HTTP POST is used to set a persistent update to a segment.
HTTP POST:
/webApp-context/services/databases/ dbsource/persistentUpdates/segments/
segment_id.json?query_parameters
Where dbsource is the name of the database to update the route data, and segment_id is the identifier of the segment to update. Use the database name specified in the Database Resource tool.
HTTP GET URL Format
The following format is used for HTTP GET requests. HTTP GET is used to return a list of persistent updates for segments.
HTTP GET:
/webApp-context/services/databases/dbsource/persistentUpdates/segments/segment_id.json
or
HTTP GET:
/webApp-context/services/databases/dbsource/persistentUpdates/segments.json?segments=segment_id
Where dbsource is the name of the database to return to persistent updates from, and segment_id is the segment to return updates.
HTTP DELETE URL Format
The following format is used for HTTP DELETE requests. HTTP DELETE is used to remove a specific persistent update to a segment.
HTTP DELETE: /webApp-context/services/databases/
dbsource/persistentUpdates/segments?mo=segment_id &resetType=query_parameters
Where dbsource is the name of the database, and segment_id is the identifier of the segment to update that contains the persistent update to remove. Use the database name specified in the Database Resource tool.
Query Parameters
The HTTP POST operation takes the following query parameters.
Parameter | Type | Required | Description |
---|---|---|---|
exclude | String | No | Specifies whether to exclude the specified segment from all route calculations. The parameter’s existence in the URL specifies whether to exclude, not the parameter value. |
velocity | String | No | Specifies the speed update where you can define the new speed of the segment by specifying the new velocity. The default unit is mph (miles per hour) unless you specify the velocityUnit parameter. |
velocityUnit | String | No | Specifies the unit of speed for the velocity or velocityAdjustment. For
speed updates, the velocity unit can have one of the following values whether the
mph is the default value:
|
velocityAdjustment | String | No | Specifies the speed update where you can define a change in the speed of the segment by specifying the change in velocity (unit and value). Speed values can be increased (positive value) or decreases (negative value). The default unit is mph (miles per hour) unless you specify the velocityUnit parameter. |
velocityPercentage | Integer | No | Specifies the speed update where you define an increase in the speed of the segment by specifying a percentage to increase (positive value) or decrease (negative value) the speed. |
roadType | String | No | Specifies the update where you can define the new road type of the segment. See the "roadType" list below. |
version | String | No | Specifies the version of the SegmentUpdates REST service. Valid values are 1 and 2. |
roadType
The roadType can be one of the following:
- access way
- back road
- connector
- ferry
- footpath
- limited access dense urban
- limited access rural
- limited access suburban
- limited access urban
- local road dense urban
- local road rural
- local road suburban
- local road urban
- major local road dense urban
- major local road rural
- major local road suburban
- major local road urban
- major road dense urban
- major road rural
- major road suburban
- major road urban
- minor local road dense Urban
- minor local road rural
- minor local road suburban
- minor local road urban
- normal road dense urban
- normal road rural
- normal road rural
- normal road urban
- primary highway dense urban
- primary highway rural
- primary highway suburban
- primary highway urban
- ramp dense urban
- ramp limited access
- ramp major road
- ramp primary highway
- ramp rural
- ramp secondary highway
- ramp urban
- ramp suburban
- secondary highway dense urban
- secondary highway rural
- secondary highway suburban
- secondary highway urban
Reset Parameter
The HTTP DELETE operation takes the following query parameter.
Parameter | Type | Required | Description |
---|---|---|---|
resetType | String | No | Specifies whether to reset (undo) an update for a segment. Available options are:
|
Examples
Exclude a segment (HTTP POST)
http://<server>:<port>/<webApp-context>/services/databases/<US_NE>/persistentUpdates/
segments/9f5c5a5a:5174e2.json?exclude=true
Return a list of updates for a single segment (HTTP GET)
http://<server>:<port>/<webApp-context>/services/databases/<US_NE>/persistentUpdates/
segments/efed6c1:a59ad5.json?velocityUnit=kph
Return a list of all segment updates for the US_NE routing database resource (HTTP GET)
http://<server>:<port>/<webApp-context>/services/databases/<US_NE>/persistentUpdates/
segments.json?segments=
Return a list of updates for the multiple segments (HTTP GET)
http://<server>:<port>/<webApp-context>/services/databases/<US_NE>/persistentUpdates/
segments.json?segments=27e20762:4718d9,7e3396fc:14c9c2c
Remove a segment speed persistent update (HTTP DELETE)
http://<server>:<port>/<webApp-context>/services/databases/<US_NE>/persistentUpdates/
segments?segmentID=9f5c5a5a:5174e2&resetType=speed