openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 17.7 kB
JSON
{"openapi":"3.0.0","info":{"description":"An API providing master data for German railway stations by DB Station&Service AG.","title":"Stationsdatenbereitstellung","version":"2.2.01","x-apisguru-categories":["transport","open_data"],"x-logo":{"backgroundColor":"#FFFFFF","url":"https://pbs.twimg.com/profile_images/591140150413025280/Cjcqjl2J.png"},"x-origin":[{"format":"swagger","url":"https://developer.deutschebahn.com/store/api-docs/DBOpenData/StaDa-Station_Data/v2","version":"2.0"}],"x-providerName":"deutschebahn.com","x-serviceName":"stada"},"paths":{"/stations":{"get":{"description":"Get a QueryResult object containing station objects from the database applying to the parameters described below. \n\nQueryResult is a container providing the following information about the query result.\n 1. the total number of hits\n 2. the maximum number of hits to be returned in that QueryResult object\n 3. the offset of the first hit returned in that QueryResult object with respect to all hits returned by the query\n 4. the result objects\n \nThe 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_. \n\nAll other parameters described below may be used multiple times.\n\nIf a parameter is given more than once, the result will contain all hits that match all given parameter values.\n\nE.g. _federalstate=berlin&federalstate=saarland_ returns all stations in Berlin and Saarland.\n\nIf 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_.\n\nE.g. _category=1-2&federalstate=hamburg_ returns all stations in Hamburg having category 1 or 2.\n\n_category=1-2&federalstate=hamburg&federalsate=hessen_ returns all stations in Hamburg and Hessen having category 1 or 2, while\n\n_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.\n\nIf no 'limit' parameter is given, the number of hits (stations) is set to its maximum value of 10000.\n\nTo specify parameter values containing German umlauts, the following encoding has to be used\n * ä => %C3%A4\n * ö => %C3%B6\n * ü => %C3%BC\n * Ä => %C3%84\n * Ö => %C3%96\n * Ü => %C3%9C\n * ß => %C3%9F\n","parameters":[{"description":"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.","in":"query","name":"offset","required":false,"schema":{"type":"integer","format":"int64"}},{"description":"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.","in":"query","name":"limit","required":false,"schema":{"type":"integer","format":"int64"}},{"description":"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*).","in":"query","name":"searchstring","required":false,"schema":{"type":"string","format":"string"}},{"description":"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.","in":"query","name":"category","required":false,"schema":{"type":"string","format":"string"}},{"description":"Filter by German federal state. Lists of federal states are also supported (e.g. federalstate=bayern,hamburg). Wildcards are not allowed here.","in":"query","name":"federalstate","required":false,"schema":{"type":"string","format":"string"}},{"description":"Filter by EVA number. Wildcards are not allowed here.","in":"query","name":"eva","required":false,"schema":{"type":"integer","format":"int64"}},{"description":"Filter by Ril100-identifier. Wildcards are not allowed here.","in":"query","name":"ril","required":false,"schema":{"type":"string","format":"string"}},{"description":"Logical operator to combine query parameters (default=AND). See above for further details. Allowed values: or, and","in":"query","name":"logicaloperator","required":false,"schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"station data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationQuery"}}}},"400":{"description":"bad request (illegal parameter or illegal parameter value)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"summary":"This operation provides the master data for german railway stations.","x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}},"/stations/{id}":{"get":{"description":"Get a QueryResult object containing one station object specified by its id.","parameters":[{"description":"Station ID (Bahnhofsnummer)","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"station data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationQuery"}}}},"400":{"description":"bad request (illegal parameter or illegal parameter value)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"summary":"This operation provides the master data for a german railway station selected by its station-id.","x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}},"/szentralen":{"get":{"description":"Get a QueryResult object containing SZentralen objects from the database applying to the parameters described below. \nQueryResult is a container providing the following information about the query result.\n 1. the total number of hits\n 2. the maximum number of hits to be returned in that QueryResult object\n 3. the offset of the first hit returned in that QueryResult object with respect to all hits returned by the query\n 4. the result objects\n","parameters":[{"description":"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.","in":"query","name":"offset","required":false,"schema":{"type":"integer","format":"int64"}},{"description":"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 100 hits will be returned.","in":"query","name":"limit","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"3-S-Zentralen data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SZentraleQuery"}}}},"400":{"description":"bad request (illegal parameter or illegal parameter value)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"summary":"This operation provides the master data for 3-S-Zentralen.","x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}},"/szentralen/{id}":{"get":{"description":"Get a QueryResult object containing one SZentralen object specified by its id. ","parameters":[{"description":"id of the 3-S-Zentrale.","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"3-S-Zentralen data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SZentraleQuery"}}}},"400":{"description":"bad request (illegal parameter or illegal parameter value)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"summary":"This operation provides the master data for 3-S-Zentralen select by its id.","x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}}},"servers":[{"url":"https://api.deutschebahn.com/stada/v2"},{"url":"http://api.deutschebahn.com/stada/v2"}],"components":{"schemas":{"Address":{"properties":{"city":{"type":"string"},"houseNumber":{"type":"string"},"street":{"type":"string"},"zipcode":{"type":"integer"}},"type":"object"},"Aufgabentraeger":{"description":"local public sector entity, responsible for short distance public transport in a specific area","properties":{"name":{"description":"full name of Aufgabentraeger","type":"string"},"shortname":{"description":"unique identifier","type":"string"}},"type":"object"},"EVANumber":{"properties":{"geographicCoordinate":{"$ref":"#/components/schemas/GeographicPoint"},"isMain":{"description":"station related EVA-Numbers","type":"boolean"},"number":{"description":"EVA identifier","type":"integer"}},"type":"object"},"Error":{"properties":{"errMsg":{"description":"error message","type":"string"},"errNo":{"description":"error number","format":"int32","type":"integer"}},"type":"object"},"GeographicPoint":{"description":"GEOJSON object of type point. By default WGS84 is the coordinate system in GEOJSON.","properties":{"coordinates":{"description":"first value is longitude, second latitude third altitude (currently not provided)","items":{"format":"double","type":"number"},"type":"array"},"type":{"description":"the type of the GEOJSON Object e.g. point. Currently only point coordinates without altitude are provided.","type":"string"}},"type":"object"},"OpeningHours":{"description":"period of time from/to","properties":{"fromTime":{"format":"date","type":"string"},"toTime":{"format":"date","type":"string"}},"type":"object"},"Partial":{"enum":["yes","no","partial"],"type":"string"},"RegionalBereichRef":{"description":"reference object. an internal organization type of Station&Service, regional department.","properties":{"name":{"description":"name of the regional department","type":"string"},"number":{"description":"unique identifier of the regional department","format":"int32","type":"integer"},"shortName":{"type":"string"}},"type":"object"},"Regionalbereich":{"description":"reference object. an internal organization type of Station&Service, regional department.","properties":{"name":{"description":"name of the regional department","type":"string"},"number":{"description":"unique identifier of the regional department","format":"int32","type":"integer"},"shortName":{"type":"string"}},"type":"object"},"RiL100Identifier":{"properties":{"geographicCoordinate":{"$ref":"#/components/schemas/GeographicPoint"},"hasSteamPermission":{"description":"permission for steam engines y/n","type":"boolean"},"isMain":{"description":"is stations main Ril100. Determination of Station&Service AG","type":"boolean"},"rilIdentifier":{"description":"Unique identifier of 'Betriebsstelle' according to Ril100","type":"string"}},"type":"object"},"SZentrale":{"description":"3-S-Zentralen are 7/24 hours operating centers for german railway stations","properties":{"address":{"$ref":"#/components/schemas/Address"},"email":{"description":"email adress of the 3-S-Zentrale (no longer supported!)","type":"string"},"internalFaxNumber":{"description":"internal fax number","type":"string"},"internalPhoneNumber":{"description":"internal phone number","type":"string"},"mobilePhoneNumber":{"description":"mobile phone number (no longer supported!)","type":"string"},"name":{"description":"unique identifier of 3SZentrale","type":"string"},"number":{"description":"unique identifier for SZentrale","format":"int32","type":"integer"},"publicFaxNumber":{"description":"public fax number","type":"string"},"publicPhoneNumber":{"type":"string"}},"type":"object"},"SZentraleQuery":{"properties":{"limit":{"description":"maximum number of result objects to be returned","format":"int64","type":"integer"},"offset":{"description":"offset of the first result object with respect to the total number of hits produced by the query","format":"int64","type":"integer"},"result":{"description":"result objects produced by that query","items":{"$ref":"#/components/schemas/SZentrale"},"type":"array"},"total":{"description":"total number of hits produced by that query","format":"int64","type":"integer"}},"type":"object"},"SZentraleRef":{"description":"reference object contained in station","properties":{"name":{"description":"unique identifier of 3SZentrale","type":"string"},"number":{"description":"unique identifier for SZentrale","format":"int32","type":"integer"},"publicPhoneNumber":{"type":"string"}},"type":"object"},"Schedule":{"description":"a weekly schedule","properties":{"friday":{"$ref":"#/components/schemas/OpeningHours"},"holiday":{"$ref":"#/components/schemas/OpeningHours"},"monday":{"$ref":"#/components/schemas/OpeningHours"},"saturday":{"$ref":"#/components/schemas/OpeningHours"},"sunday":{"$ref":"#/components/schemas/OpeningHours"},"thursday":{"$ref":"#/components/schemas/OpeningHours"},"tuesday":{"$ref":"#/components/schemas/OpeningHours"},"wednesday":{"$ref":"#/components/schemas/OpeningHours"}},"type":"object"},"Station":{"properties":{"DBinformation":{"$ref":"#/components/schemas/Schedule"},"aufgabentraeger":{"$ref":"#/components/schemas/Aufgabentraeger"},"category":{"description":"the stations category (-1...7). Stations with category -1 or 0 are not in production, e.g. planned, saled, without train stops.","format":"int32","type":"integer"},"evaNumbers":{"description":"station related EVA-Numbers","items":{"$ref":"#/components/schemas/EVANumber"},"type":"array"},"federalState":{"description":"german federal state","type":"string"},"hasBicycleParking":{"description":"public bicycle parking y/n","type":"boolean"},"hasCarRental":{"description":"car sharing or car rental y/n","type":"boolean"},"hasDBLounge":{"description":"DB lounge y/n","type":"boolean"},"hasLocalPublicTransport":{"description":"local public transport y/n","type":"boolean"},"hasLockerSystem":{"description":"public facilities y/n","type":"boolean"},"hasLostAndFound":{"description":"lost and found y/n","type":"boolean"},"hasMobilityService":{"description":"values are 'no', 'yes, advance notification is requested...' or 'yes, advance notification is required...'","type":"string"},"hasParking":{"description":"public parking y/n","type":"boolean"},"hasPublicFacilities":{"description":"public facilities y/n","type":"boolean"},"hasRailwayMission":{"description":"railway mission y/n","type":"boolean"},"hasSteplessAccess":{"$ref":"#/components/schemas/Partial"},"hasTaxiRank":{"description":"taxi rank in front of the station y/n","type":"boolean"},"hasTravelCenter":{"description":"local travel center y/n","type":"boolean"},"hasTravelNecessities":{"description":"a shop for travel necessities y/n","type":"boolean"},"hasWiFi":{"description":"public Wi-Fi is available y/n","type":"boolean"},"localServiceStaff":{"$ref":"#/components/schemas/Schedule"},"mailingAdress":{"$ref":"#/components/schemas/Address"},"name":{"description":"the stations name","type":"string"},"number":{"description":"unique identifier representing a specific railway station","format":"int32","type":"integer"},"priceCategory":{"description":"determines in some respect the price for train stops at a specific station (1..7)","format":"int32","type":"integer"},"regionalbereich":{"$ref":"#/components/schemas/RegionalBereichRef"},"riL100Identifiers":{"description":"station related Ril100s","items":{"$ref":"#/components/schemas/RiL100Identifier"},"type":"array"},"stationManagement":{"$ref":"#/components/schemas/StationManagementRef"},"szentrale":{"$ref":"#/components/schemas/SZentraleRef"},"timetableOffice":{"$ref":"#/components/schemas/TimetableOffice"}},"type":"object"},"StationManagement":{"properties":{"name":{"type":"string"},"number":{"description":"identifier","type":"integer"}},"type":"object"},"StationManagementRef":{"properties":{"name":{"type":"string"},"number":{"description":"identifier","type":"integer"}},"type":"object"},"StationQuery":{"properties":{"limit":{"description":"maximum number of result objects to be returned","format":"int64","type":"integer"},"offset":{"description":"offset of the first result object with respect to the total number of hits produced by the query","format":"int64","type":"integer"},"result":{"description":"result objects produced by that query","items":{"$ref":"#/components/schemas/Station"},"type":"array"},"total":{"description":"total number of hits produced by that query","format":"int64","type":"integer"}},"type":"object"},"TimetableOffice":{"properties":{"email":{"description":"email","type":"string"},"name":{"description":"identifier","type":"string"}},"type":"object"}}}}