Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Changes in the Dataset Structure in DBP 2.0

...

Access Token Endpoint: https://user.mobilitaetsverbuende.at/auth/realms/dbp-public/protocol/openid-connect/token

Changed: Client ID: dbp-public-ui

Grant Type: password

...

  • to download the data of a dataset version you must give the year of the version, which means, you need to use an endpoint like /api/public/v1/data-sets/27/2023/file - where here 27 is the dataset id and 2023 is the year for which we want to download the latest data.

...

This example script demonstrates how to get the access token from Keycloak and how to use the access token to automatically download a data set file. The OpenID Connect standard is well described on the internet. For all supported operations of the REST API interface of the DBP and the structure of the returned information it is strongly recommended that you consult DBP Public Swagger UI. (Important: Unfortunately this link will still show the old documentation until November 22nd, 2023.)

Changes for DBP 2.0:

  • Client Id has changed: you must now use dbp-public-ui

  • Function get_access_token has changed: a new parameter (-d “scope=openid”) was added

  • Function get_dataset_list has changed: there is an HTTP parameter added after the URL: tagFilterModeInclusive, which must be set to true

  • Function download_dataset has changed: the endpoint must contain the year for the dataset version that you want to download (which in this example we get as the 3rd parameter of the function)

...