Skip to content

Pseudo-Service DiDok

The stops play an important role for many other queries. They can be taken from Didok (description) or from the station list (description).

Technical aspects

Using CKAN API enables you to initiate a simple search. Please note that you need to have an API key for this.

Sample query using the station list

Search for stops with Lausanne in the name:

  • Find the resource ID for the current resource from the “bhlist” using CKAN API:

  • The resource with the ID “Station list” is used. The “id” will the be used in the second step.

    Use the query “https://opentransportdata.swiss/api/action/datastore_search?resource_id=<resource-id>&q=<search_string>”


     

Sample query using DiDok

We are looking for “Domodossola” using an SQL query.

  • Identification of resource in “DiDok”:

  • We will now search for Domodossola using the ID in the resource with the identifier “Didok.xlsx”.

  • The code which is currently valid for a resource must be inserted instead of “079e10fc-c212-4fc8-a75d-d02028f1539c”.

    More detailed information

Start the discussion at disc.opentransportdata.swiss