v1

latestSwagger 2.02026-07-1441916.6 KB

This operation provides the master data for german railway stations.

Get a QueryResult object containing station objects from the database applying to the parameters described below.

QueryResult is a container providing the following information about the query result.

  1. the total number of hits
  2. the maximum number of hits to be returned in that QueryResult object
  3. the offset of the first hit returned in that QueryResult object with respect to all hits returned by the query
  4. the result objects

The parameters described below work as filters to reduce the number of hits returned. Some of these parameters must be used only once, others are allowed to be used multiple times. Valid parameters that are allowed to be used only once are offset, limit and logicaloperator.

All other parameters described below may be used multiple times.

If a parameter is given more than once, the result will contain all hits that match all given parameter values.

E.g. federalstate=berlin&federalstate=saarland returns all stations in Berlin and Saarland.

If more than one filter criterion is used at the same time, the different filter criteria are interpreted as if they are combined by a logical AND operator, unless the parameter logicaloperator is set to or.

E.g. category=1-2&federalstate=hamburg returns all stations in Hamburg having category 1 or 2.

category=1-2&federalstate=hamburg&federalsate=hessen returns all stations in Hamburg and Hessen having category 1 or 2, while

searchstring=berlin*&federalstate=hamburg&federalsate=hessen&logicaloperator=or will return all stations with a name starting with 'berlin' as well as all stations in Hamburg and Hessen.

If no 'limit' parameter is given, the number of hits (stations) is set to its maximum value of 10000.

To specify parameter values containing German umlauts, the following encoding has to be used

  • ä => %C3%A4
  • ö => %C3%B6
  • ü => %C3%BC
  • Ä => %C3%84
  • Ö => %C3%96
  • Ü => %C3%9C
  • ß => %C3%9F
get/stations

Query parameters

offsetinteger

Offset of the first hit returned in the QueryResult object with respect to all hits returned by the query. If this parameter is omitted, it will be set to 0 internally.

limitinteger

The maximum number of hits to be returned by that query. If 'limit' is set greater than 10000, it will be reset to 10000 internally and only 10000 hits will be returned.

searchstringstring string

String to search for a station name. The wildcards * (indicating an arbitrary number of characters) and ? (indicating one single character) can be used in the search pattern. A comma separated list of station names is also supported (e.g. searchstring=hamburg*,berlin*).

categorystring string

Filter by station category. Category ranges are supported as well as lists of categories (e.g. category=2-4 or category=1,3-5). The category must be between 1 and 7 otherwise a parameter exception is returned.

federalstatestring string

Filter by German federal state. Lists of federal states are also supported (e.g. federalstate=bayern,hamburg). Wildcards are not allowed here.

evainteger

Filter by EVA number. Wildcards are not allowed here.

rilstring string

Filter by Ril100-identifier. Wildcards are not allowed here.

logicaloperatorstring string

Logical operator to combine query parameters (default=AND). See above for further details. Allowed values: or, and

Response

station data

limitinteger

maximum number of result objects to be returned

offsetinteger

offset of the first result object with respect to the total number of hits produced by the query

totalinteger

total number of hits produced by that query

All 4 operations