SIRI Updaters
Support for consuming SIRI ET and SX messages via HTTPS. The updaters 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.
Contact Info
- Lasse Tyrihjell, Entur, Norway
- Leonard Ehrenfried, Germany
Configuration
To enable the SIRI updater you need to add it to the updaters
section of the router-config.json
.
SIRI-ET Request/Response via HTTPS
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 |
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 | |
headers | map of string |
HTTP headers to add to the request. Any header key, value can be inserted. | Optional | 2.3 |
Parameter details
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
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",
"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, but this updater supports the following definition:
Fetching XML-formatted SIRI messages as 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 |
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 | |
headers | map of string |
HTTP headers to add to the request. Any header key, value can be inserted. | Optional | 2.7 |
Parameter details
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
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
}
]
}
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"
}
]
}
Changelog
- Initial version of SIRI updater (October 2019)
- Include situations with no or no handled entity selectors with Unknown EntitySelector (December 2021, https://github.com/opentripplanner/OpenTripPlanner/pull/3780)