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: /rest/Spatial/erm/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 Spectrum Spatial Routing 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: /rest/Spatial/erm/databases/dbsource/persistentUpdates/segments/segment_id.json
or
HTTP GET: /rest/Spatial/erm/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: /rest/Spatial/erm/databases/dbsource/persistentUpdates/segments?segmentID=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 Spectrum Spatial Routing Database Resource tool.
Query Parameters
The HTTP POST operation takes the following query parameters.
Parameter | Type | Required | Description |
---|---|---|---|
exclude | String | no | 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 | This is a speed update where you 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 |
This is a unit of speed for the velocity or velocityAdjustment. For speed updates, the velocity unit can have one of the following values: mph (miles per hour) and kph (kilometers per hour). The default value is mph. |
velocityAdjustment | String | no | This is a speed update where you 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 | This is a 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 |
This is an update where you define the new road type of the segment. The road type can be one of the following:
|
Reset Parameter
The HTTP DELETE operation takes the following query parameter.
Parameter | Type | Required | Description |
---|---|---|---|
resetType | String | Yes |
Reset (undo) a type of update for a segment.
|
Examples
Exclude a segment (HTTP POST)
http://<server>:<port>/rest/Spatial/erm/databases/US_NE/persistentUpdates/segments/9f5c5a5a:5174e2.json?exclude=true
Return a list of updates for a single segment (HTTP GET)
http://<server>:<port>/rest/Spatial/erm/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>/rest/Spatial/erm/databases/US_NE/persistentUpdates/segments.json?segments=
Return a list of updates for the multiple segments (HTTP GET)
http://<server>:<port>/rest/Spatial/erm/databases/US_NE/persistentUpdates/segments.json?segments=27e20762:4718d9,7e3396fc:14c9c2c
Remove a segment speed persistent update (HTTP DELETE)
http://<server>:<port>/rest/Spatial/erm/databases/US_NE/persistentUpdates/segments?segmentID=9f5c5a5a:5174e2&resetType=speed