Skip to content

Vehicle Parking Updaters

Contact Info

  • For HSL Park and Ride updater: Digitransit team, HSL, Helsinki, Finland
  • For Bikely updater: Leonard Ehrenfried, mail@leonard.io

Documentation

This sandbox contains vehicle parking updaters. Unlike for some other sandbox features, this is not enabled/disabled through otp-config.json but from router-config.json updaters.

Currently contains the following updaters:

Configuration

These sandboxed vehicle parking updaters can be enabled by editing the updaters section in the router-config.json according to the following examples.

All updaters have the following parameters in common:

  • type: this needs to be "vehicle-parking"
  • feedId: this is used as a "prefix" for park ids, entrance ids and sometimes also for tags.

HSL Park and Ride

Config Parameter Type Summary Req./Opt. Default Value Since
type = "vehicle-parking" enum The type of the updater. Required 1.5
facilitiesFrequencySec integer How often the facilities should be updated. Optional 3600 2.2
facilitiesUrl string URL of the facilities. Optional 2.2
feedId string The name of the data source. Optional 2.2
hubsUrl string Hubs URL Optional 2.2
sourceType enum The source of the vehicle updates. Required 2.2
timeZone time-zone The time zone of the feed. Optional 2.2
utilizationsFrequencySec integer How often the utilization should be updated. Optional 600 2.2
utilizationsUrl string URL of the utilization data. Optional 2.2

Details

feedId

Since version: 2.2Type: stringCardinality: Optional
Path: /updaters/[2]

The name of the data source.

This will end up in the API responses as the feed id of of the parking lot.

sourceType

Since version: 2.2Type: enumCardinality: Required
Path: /updaters/[2]
Enum values: park-api | bicycle-park-api | hsl-park | bikely

The source of the vehicle updates.

timeZone

Since version: 2.2Type: time-zoneCardinality: Optional
Path: /updaters/[2]

The time zone of the feed.

Used for converting abstract opening hours into concrete points in time.

Example configuration
// router-config.json
{
  "updaters" : [
    {
      "type" : "vehicle-parking",
      "sourceType" : "hsl-park",
      "feedId" : "hslpark",
      "timeZone" : "Europe/Helsinki",
      "facilitiesFrequencySec" : 3600,
      "facilitiesUrl" : "https://p.hsl.fi/api/v1/facilities.json?limit=-1",
      "utilizationsFrequencySec" : 600,
      "utilizationsUrl" : "https://p.hsl.fi/api/v1/utilizations.json?limit=-1",
      "hubsUrl" : "https://p.hsl.fi/api/v1/hubs.json?limit=-1"
    }
  ]
}

ParkAPI

Config Parameter Type Summary Req./Opt. Default Value Since
type = "vehicle-parking" enum The type of the updater. Required 1.5
feedId string The name of the data source. Optional 2.2
frequencySec integer How often to update the source. Optional 60 2.2
sourceType enum The source of the vehicle updates. Required 2.2
timeZone time-zone The time zone of the feed. Optional 2.2
url string URL of the resource. Optional 2.2
headers map of string HTTP headers to add to the request. Any header key, value can be inserted. Optional 2.2
tags string[] Tags to add to the parking lots. Optional 2.2

Details

feedId

Since version: 2.2Type: stringCardinality: Optional
Path: /updaters/[3]

The name of the data source.

This will end up in the API responses as the feed id of of the parking lot.

sourceType

Since version: 2.2Type: enumCardinality: Required
Path: /updaters/[3]
Enum values: park-api | bicycle-park-api | hsl-park | bikely

The source of the vehicle updates.

timeZone

Since version: 2.2Type: time-zoneCardinality: Optional
Path: /updaters/[3]

The time zone of the feed.

Used for converting abstract opening hours into concrete points in time.

headers

Since version: 2.2Type: map of stringCardinality: Optional
Path: /updaters/[3]

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

tags

Since version: 2.2Type: string[]Cardinality: Optional
Path: /updaters/[3]

Tags to add to the parking lots.

Example configuration
// router-config.json
{
  "updaters" : [
    {
      "type" : "vehicle-parking",
      "sourceType" : "park-api",
      "feedId" : "parkapi",
      "timeZone" : "Europe/Berlin",
      "frequencySec" : 600,
      "url" : "https://foo.bar",
      "headers" : {
        "Cache-Control" : "max-age=604800"
      },
      "tags" : [
        "source:parkapi"
      ]
    }
  ]
}

Bikely

Config Parameter Type Summary Req./Opt. Default Value Since
type = "vehicle-parking" enum The type of the updater. Required 1.5
feedId string The name of the data source. Optional 2.2
frequencySec integer How often to update the source. Optional 60 2.3
sourceType enum The source of the vehicle updates. Required 2.2
url string URL of the locations endpoint. Optional 2.3
headers map of string HTTP headers to add to the request. Any header key, value can be inserted. Optional 2.3

Details

feedId

Since version: 2.2Type: stringCardinality: Optional
Path: /updaters/[4]

The name of the data source.

This will end up in the API responses as the feed id of of the parking lot.

sourceType

Since version: 2.2Type: enumCardinality: Required
Path: /updaters/[4]
Enum values: park-api | bicycle-park-api | hsl-park | bikely

The source of the vehicle updates.

headers

Since version: 2.3Type: map of stringCardinality: Optional
Path: /updaters/[4]

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

Example configuration
// router-config.json
{
  "updaters" : [
    {
      "type" : "vehicle-parking",
      "feedId" : "bikely",
      "sourceType" : "bikely",
      "url" : "https://api.safebikely.com/api/v1/s/locations",
      "headers" : {
        "X-Bikely-Token" : "${BIKELY_TOKEN}",
        "Authorization" : "${BIKELY_AUTHORIZATION}"
      }
    }
  ]
}

Changelog

  • Create initial sandbox implementation (January 2022, #3796)
  • Add timeZone parameter to hsl and parkapi updaters (September 2022, #4427)
  • Added support for HSL parking hubs (October 2022, #4510)
  • Add Bikely updater (November 2022, #4589)