PersistentUpdate - web_services - 23.1

Spectrum Web Services Guide

Product type
Software
Portfolio
Integrate
Product family
Spectrum
Product
Spectrum > Web Services
Version
23.1
Language
English
Product name
Spectrum Technology Platform
Title
Spectrum Web Services Guide
First publish date
2007
Last updated
2024-10-17
Published on
2024-10-17T00:33:46.811413

Description

The PersistentUpdate service allows a user to override aspects of the network. The overrides can be done on a per-road type, at a specific point or at a specific segment. The persistent update is valid only for a specific data source and may not be valid after a data update.

Using persistent updates to make these types of modifications, you have the ability to:

  • Exclude a point
  • Exclude a segment
  • Set the speed of a point, segment, or road type
  • Change (increase or decrease) the speed of a point, segment, or road type by a value
  • Change (increase or decrease) the speed of a point, segment, or road type by a percentage
  • List persistent updates
Note: Since persistent updates are changes made on a system-wide basis for routing data and all updates will persist, they should be used with caution. The response from the REST service will be a success message. When a request contains invalid query parameters in the GET URL or an invalid payload for POST, a cumulative error response will be returned in a JSON array. The value node in the response JSON is deprecated. For error checking, only the errors node should be utilized.

Version specific error response

When you enter an invalid parameter value (for example, multiple updates) in a request, the error response you get depends on the version entered by you. When the version is 1, you get value and error whereas when the version is 2, the response only contains the error.

  • Request when version is 1:
    http://<server>:<port>/rest/Spatial/erm/databases/usroutedatabase.json?
    velocity=15.912&velocityUnit=KPH&velocityAdjustment=34&velocityPercentage=56&version=1
  • Response:
    {
      "value": "One of either Velocity or SpeedIncrease or SpeedDecrease is expected.",
      "errors": [
        {
          "errorCode": 3733,
          "userMessage": "One of either Velocity or SpeedIncrease or SpeedDecrease is expected."
        }
      ]
    }
  • Request when version is 2:
    http://<server>:<port>/rest/Spatial/erm/databases/usroutedatabase.json?
    velocity=15.912&velocityUnit=KPH&velocityAdjustment=34&velocityPercentage=56&version=2
  • Response:
    {
      "errors": [
        {
          "errorCode": 3733,
          "userMessage": "One of either Velocity or SpeedIncrease or SpeedDecrease is expected."
        }
      ]
    }

Types of Persistent Updates

See the following sections for information and examples of the persistent update request types: