Skip to content

SIRI

These updaters support consuming SIRI-ET and SX messages via HTTPS. They aim to support the Nordic and EPIP SIRI profiles which are subsets of the SIRI specification.

For more documentation about the Norwegian profile and data, go to the Entur Real-Time Data documentation and the Norwegian SIRI profile.

To enable one of the SIRI updaters you need to add it to the updaters section of the router-config.json.

SIRI-ET Request/Response via HTTPS

This requires there to be a SIRI server that handles SIRI POST requests, stores requestor refs and responds only with the newest data.

Config Parameter Type Summary Req./Opt. Default Value Since
type = "siri-et-updater" enum The type of the updater. Required 1.5
blockReadinessUntilInitialized boolean Whether catching up with the updates should block the readiness check from returning a 'ready' result. Optional false 2.0
feedId string The ID of the feed to apply the updates to. Required 2.0
frequency duration How often the updates should be retrieved. Optional "PT1M" 2.0
fuzzyTripMatching boolean Deprecated, use fuzzyMatching. If the fuzzy trip matcher should be used to match trips. Optional false 2.0
previewInterval duration TODO Optional 2.0
producerMetrics boolean If failure, success, and warning metrics should be collected per producer. Optional false 2.7
requestorRef string The requester reference. Optional 2.0
timeout duration The HTTP timeout to download the updates. Optional "PT15S" 2.0
url string The URL to send the HTTP requests to. Required 2.0
fuzzyMatching object Enable the fuzzy trip matcher, with options. Optional 2.11
   timeTolerance duration The maximum difference between the scheduled and the aimed times. Optional "PT0S" 2.11
headers map of string HTTP headers to add to the request. Any header key, value can be inserted. Optional 2.3
Parameter details

fuzzyTripMatching

Since version: 2.0 ∙ Type: boolean ∙ Cardinality: Optional ∙ Default value: false
Path: /updaters/[8]

Deprecated, use fuzzyMatching. If the fuzzy trip matcher should be used to match trips.

true is the same as "fuzzyMatching" : {}. This parameter is ignored if fuzzyMatching is set, so both can be set in a configuration used by OTP versions with and without fuzzyMatching.

url

Since version: 2.0 ∙ Type: string ∙ Cardinality: Required
Path: /updaters/[8]

The URL to send the HTTP requests to.

Use the file protocol to set a directory for reading updates from a directory. The file loader will look for xml files: '*.xml' in the configured directory. The files are renamed by the loader when processed:

    a.xml   ➞   a.xml.inProgress   ➞   a.xml.ok   or   a.xml.failed

fuzzyMatching

Since version: 2.11 ∙ Type: object ∙ Cardinality: Optional
Path: /updaters/[8]

Enable the fuzzy trip matcher, with options.

The fuzzy trip matcher identifies the scheduled trip of a SIRI-ET message by its last stop, line, service date and the aimed times of the first and last call. Use it for producers whose messages do not contain usable trip ids.

If this parameter is set, fuzzy trip matching is enabled with the given options and the deprecated fuzzyTripMatching parameter is ignored. Use an empty object {} to enable fuzzy trip matching with the default options.

If a trip matches the aimed times exactly, it is used. Otherwise, if more than one trip matches within the time tolerance, the message is rejected.

timeTolerance

Since version: 2.11 ∙ Type: duration ∙ Cardinality: Optional ∙ Default value: "PT0S"
Path: /updaters/[8]/fuzzyMatching

The maximum difference between the scheduled and the aimed times.

A scheduled trip matches if its scheduled departure time at the first stop and its scheduled arrival time at the last stop differ from the SIRI aimed times by at most this duration. Use this if the producer sends aimed times in whole minutes, while the schedule contains seconds. The tolerance must be in whole seconds and less than 30 minutes. A larger tolerance increases the chance that more than one trip matches, in which case the message is rejected.

headers

Since version: 2.3 ∙ Type: map of string ∙ Cardinality: Optional
Path: /updaters/[8]

HTTP headers to add to the request. Any header key, value can be inserted.

Example configuration
// router-config.json
{
  "updaters" : [
    {
      "type" : "siri-et-updater",
      "url" : "https://example.com/some/path",
      "feedId" : "feed_id",
      "timeout" : "30s",
      "fuzzyMatching" : {
        "timeTolerance" : "59s"
      },
      "headers" : {
        "Authorization" : "Some-Token"
      }
    }
  ]
}

SIRI-SX Request/Response via HTTPS

Config Parameter Type Summary Req./Opt. Default Value Since
type = "siri-sx-updater" enum The type of the updater. Required 1.5
blockReadinessUntilInitialized boolean Whether catching up with the updates should block the readiness check from returning a 'ready' result. Optional false 2.0
earlyStart duration This value is subtracted from the actual validity defined in the message. Optional "PT0S" 2.0
feedId string The ID of the feed to apply the updates to. Required 2.0
frequency duration How often the updates should be retrieved. Optional "PT1M" 2.0
requestorRef string The requester reference. Optional 2.0
timeout duration The HTTP timeout to download the updates. Optional "PT15S" 2.0
url string The URL to send the HTTP requests to. Supports http/https and file protocol. Required 2.0
headers map of string HTTP headers to add to the request. Any header key, value can be inserted. Optional 2.3
Parameter details

earlyStart

Since version: 2.0 ∙ Type: duration ∙ Cardinality: Optional ∙ Default value: "PT0S"
Path: /updaters/[9]

This value is subtracted from the actual validity defined in the message.

Normally the planned departure time is used, so setting this to 10s will cause the SX-message to be included in trip-results 10 seconds before the the planned departure time.

url

Since version: 2.0 ∙ Type: string ∙ Cardinality: Required
Path: /updaters/[9]

The URL to send the HTTP requests to. Supports http/https and file protocol.

Use the file protocol to set a directory for reading updates from a directory. The file loader will look for xml files: '*.xml' in the configured directory. The files are renamed by the loader when processed:

    a.xml   ➞   a.xml.inProgress   ➞   a.xml.ok   or   a.xml.failed

headers

Since version: 2.3 ∙ Type: map of string ∙ Cardinality: Optional
Path: /updaters/[9]

HTTP headers to add to the request. Any header key, value can be inserted.

Example configuration
// router-config.json
{
  "updaters" : [
    {
      "type" : "siri-sx-updater",
      "url" : "https://example.com/some/path",
      "feedId" : "feed_id",
      "timeout" : "30s",
      "headers" : {
        "Key" : "Value"
      }
    }
  ]
}

SIRI-ET Lite

SIRI Lite is not very well specified [1] [2] but this updater supports the following definition:

Fetching XML-formatted SIRI messages as a single GET request rather than the more common request/response flow.

This means that the XML feed must contain all updates for all trips, just like it is the case for GTFS-RT TripUpdates.

Config Parameter Type Summary Req./Opt. Default Value Since
type = "siri-et-lite" enum The type of the updater. Required 1.5
feedId string The ID of the feed to apply the updates to. Required 2.7
frequency duration How often the updates should be retrieved. Optional "PT1M" 2.7
fuzzyTripMatching boolean Deprecated, use fuzzyMatching. If the fuzzy trip matcher should be used to match trips. Optional false 2.7
timeout duration The HTTP timeout to download the updates. Optional "PT15S" 2.7
url uri The URL to send the HTTP requests to. Required 2.7
fuzzyMatching object Enable the fuzzy trip matcher, with options. Optional 2.11
   timeTolerance duration The maximum difference between the scheduled and the aimed times. Optional "PT0S" 2.11
headers map of string HTTP headers to add to the request. Any header key, value can be inserted. Optional 2.7
Parameter details

fuzzyTripMatching

Since version: 2.7 ∙ Type: boolean ∙ Cardinality: Optional ∙ Default value: false
Path: /updaters/[15]

Deprecated, use fuzzyMatching. If the fuzzy trip matcher should be used to match trips.

true is the same as "fuzzyMatching" : {}. This parameter is ignored if fuzzyMatching is set, so both can be set in a configuration used by OTP versions with and without fuzzyMatching.

url

Since version: 2.7 ∙ Type: uri ∙ Cardinality: Required
Path: /updaters/[15]

The URL to send the HTTP requests to.

Use the file protocol to set a directory for reading updates from a directory. The file loader will look for xml files: '*.xml' in the configured directory. The files are renamed by the loader when processed:

    a.xml   ➞   a.xml.inProgress   ➞   a.xml.ok   or   a.xml.failed

fuzzyMatching

Since version: 2.11 ∙ Type: object ∙ Cardinality: Optional
Path: /updaters/[15]

Enable the fuzzy trip matcher, with options.

The fuzzy trip matcher identifies the scheduled trip of a SIRI-ET message by its last stop, line, service date and the aimed times of the first and last call. Use it for producers whose messages do not contain usable trip ids.

If this parameter is set, fuzzy trip matching is enabled with the given options and the deprecated fuzzyTripMatching parameter is ignored. Use an empty object {} to enable fuzzy trip matching with the default options.

If a trip matches the aimed times exactly, it is used. Otherwise, if more than one trip matches within the time tolerance, the message is rejected.

timeTolerance

Since version: 2.11 ∙ Type: duration ∙ Cardinality: Optional ∙ Default value: "PT0S"
Path: /updaters/[15]/fuzzyMatching

The maximum difference between the scheduled and the aimed times.

A scheduled trip matches if its scheduled departure time at the first stop and its scheduled arrival time at the last stop differ from the SIRI aimed times by at most this duration. Use this if the producer sends aimed times in whole minutes, while the schedule contains seconds. The tolerance must be in whole seconds and less than 30 minutes. A larger tolerance increases the chance that more than one trip matches, in which case the message is rejected.

headers

Since version: 2.7 ∙ Type: map of string ∙ Cardinality: Optional
Path: /updaters/[15]

HTTP headers to add to the request. Any header key, value can be inserted.

Example configuration
// router-config.json
{
  "updaters" : [
    {
      "type" : "siri-et-lite",
      "feedId" : "sta",
      "url" : "https://example.com/siri-lite/estimated-timetable/xml",
      "fuzzyTripMatching" : true,
      "fuzzyMatching" : {
        "timeTolerance" : "59s"
      }
    }
  ]
}

SIRI-SX Lite

This updater follows the same definition of SIRI Lite as the SIRI-ET one: it downloads the entire feed in a single HTTP GET request.

Config Parameter Type Summary Req./Opt. Default Value Since
type = "siri-sx-lite" enum The type of the updater. Required 1.5
earlyStart duration This value is subtracted from the actual validity defined in the message. Optional "PT0S" 2.0
feedId string The ID of the feed to apply the updates to. Required 2.7
frequency duration How often the updates should be retrieved. Optional "PT1M" 2.7
timeout duration The HTTP timeout to download the updates. Optional "PT15S" 2.7
url uri The URL to send the HTTP requests to. Required 2.7
headers map of string HTTP headers to add to the request. Any header key, value can be inserted. Optional 2.7
Parameter details

earlyStart

Since version: 2.0 ∙ Type: duration ∙ Cardinality: Optional ∙ Default value: "PT0S"
Path: /updaters/[16]

This value is subtracted from the actual validity defined in the message.

Normally the planned departure time is used, so setting this to 10s will cause the SX-message to be included in trip-results 10 seconds before the the planned departure time.

url

Since version: 2.7 ∙ Type: uri ∙ Cardinality: Required
Path: /updaters/[16]

The URL to send the HTTP requests to.

Use the file protocol to set a directory for reading updates from a directory. The file loader will look for xml files: '*.xml' in the configured directory. The files are renamed by the loader when processed:

    a.xml   ➞   a.xml.inProgress   ➞   a.xml.ok   or   a.xml.failed

headers

Since version: 2.7 ∙ Type: map of string ∙ Cardinality: Optional
Path: /updaters/[16]

HTTP headers to add to the request. Any header key, value can be inserted.

Example configuration
// router-config.json
{
  "updaters" : [
    {
      "type" : "siri-sx-lite",
      "feedId" : "sta",
      "url" : "https://example.com/siri-lite/situation-exchange/xml"
    }
  ]
}