Segment Updates

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 Spatial Module 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.

Note: The first format is used to return the persistent update for only one segment. The second format is used to return either multiple segments or all segments. For multiple segments, use a comma separated list of segment ids. For all segments, use an empty segments= parameter. See examples below.

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 Spatial Module 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:

  • 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 Yes

Reset (undo) a type of update for a segment.

speed
Reset the speed update for a specific segment.
exclude
Reset the exclude for a specific segment.
roadType
Reset the road type for a specific 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