├── README.md ├── db-ice-portal-api-specification.yaml └── examples └── status-1445351850874.json /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbopendata/db-ice-portal-api/bf782601e4b6fdb34dd41c7329131100fda6fda9/README.md -------------------------------------------------------------------------------- /db-ice-portal-api-specification.yaml: -------------------------------------------------------------------------------- 1 | swagger: "2.0" 2 | 3 | info: 4 | # version of the API: 5 | version: 1.0.0 6 | title: Deutsche Bahn ICE Portal API 7 | description: API of the on-board portal of the ICE trains of Deutsche Bahn (http://ice.portal1). 8 | termsOfService: 'http://data.deutschebahn.com/apis/iceportal/' 9 | contact: 10 | name: DB Open Data 11 | email: DBOpenData@deutschebahn.com 12 | schemes: 13 | - http 14 | host: ice.portal1 15 | basePath: /jetty/api/v1 16 | produces: 17 | - application/json 18 | 19 | paths: 20 | /status: 21 | get: 22 | summary: Train Status 23 | description: Returns train status including speed and position 24 | responses: 25 | 200: 26 | description: A single status object. 27 | schema: 28 | $ref: '#/definitions/status' 29 | 30 | definitions: 31 | status: 32 | type: object 33 | properties: 34 | connection: 35 | type: boolean 36 | description: Connection status, e.g. true 37 | servicelevel: 38 | type: string 39 | description: Service level status, e.g. "SERVICE" 40 | speed: 41 | type: number 42 | format: double 43 | description: Train speed in kilometer per hour, e.g. 185.8000030517578 44 | longitude: 45 | type: number 46 | format: double 47 | description: Longitude in WGS84 decimal notation, e.g. 10.924448 48 | latitude: 49 | type: number 50 | format: double 51 | description: Latitude in WGS84 decimal notation, e.g. 52.432009 52 | serverTime: 53 | type: integer 54 | format: int64 55 | description: Server time as unix time (UTC), e.g. 1445351850874 -------------------------------------------------------------------------------- /examples/status-1445351850874.json: -------------------------------------------------------------------------------- 1 | { 2 | "connection":true, 3 | "servicelevel":"SERVICE", 4 | "speed":185.8000030517578, 5 | "longitude":10.924448, 6 | "latitude":52.432009, 7 | "serverTime":1445351850874 8 | } --------------------------------------------------------------------------------