swagger: '2.0'
info:
version: 2.0.3
title: MIP Infrastructure API
description: >-
This API can be used to receive information about stops and the infrastructure at these stops.
schemes:
- https
paths:
'/vrr-api/rest/stop':
get:
tags:
- Infrastructure API
summary: Find all stops of the MIP.
description: Find all stops of the MIP.
security:
- ApiKey: []
produces:
- application/json
parameters:
- in: query
name: place
type: string
required: false
description: Optional "Place" filter- The place of the stop, i.e. "Dortmund"
- in: query
name: ifopt
type: string
required: false
description: Optional "ifopt" filter - The ifopt of the stop, i.e. "de:05154:35102"
- in: query
name: stopName
type: string
required: false
description: Optional "StopName" filter - The name of a stop, i.e. "Dortmund Hbf"
- in: query
name: stopNameWithoutLocality
type: string
required: false
description: Optional "StopNameWithoutLocality" filter - The name of a stop without locality, i.e. "Hbf"
- in: query
name: osm
type: string
required: false
description: Optional "OSM" filter - area within which the stop must be located. Area must be specified by a set of geo locations encoded as string input.
longitude and latitude values must be separated by a single semicolon ; i.e. 13.703963;15.374694
coordinates must be separated by two semicolons ;; i.e. 13.703963;15.374694;;13.703984;15.377439
Input Pattern:
longitude1;latitude1;;longitude2;latitude2;;longitude3;latitude3;;longitude4;lattitude4
Example Value
13.703963;15.374694;;13.703984;15.377439;;13.698338;15.374908;;13.698495;115.37755
- in: query
name: infrastructure
type: string
required: false
description: Optional "Infrastructure" filter - The name of an infrastrukture element, i.e. "Rampe"
responses:
'200':
description: ok
schema:
type: array
items:
$ref: '#/definitions/StopSummary'
'400':
description: Bad Request.
'401':
description: Authorization required.
'404':
description: Not found.
'/vrr-api/rest/stop/{ifopt}/infrastructure':
get:
tags:
- Infrastructure API
summary: Get the most recent known state of every infrastructure for the given stop.
description: Get the most recent known state of every infrasdtructure for the given stop.
security:
- ApiKey: []
produces:
- application/json
parameters:
- in: path
name: ifopt
type: string
required: true
description: The ifopt of the stop
responses:
'200':
description: ok
schema:
type: array
items:
$ref: '#/definitions/Infrastructure'
'400':
description: Bad Request.
'401':
description: Authorization required.
'404':
description: Not found.
'/vrr-api/rest/stop/all/infrastructure':
get:
tags:
- Infrastructure API
summary: Get the most recent known state of every infrastructure for every stop of the MIP.
description: Get the most recent known state of every infrastructure for every stop of the MIP.
security:
- ApiKey: []
produces:
- application/json
parameters:
- in: query
name: place
type: string
required: false
description: Optional "Place" filter- The place of the stop, i.e. "Dortmund"
- in: query
name: ifopt
type: string
required: false
description: Optional "ifopt" filter - The ifopt of the stop, i.e. "de:05154:35102"
- in: query
name: stopName
type: string
required: false
description: Optional "StopName" filter - The name of a stop, i.e. "Dortmund Hbf"
- in: query
name: stopNameWithoutLocality
type: string
required: false
description: Optional "StopNameWithoutLocality" filter - The name of a stop without locality, i.e. "Hbf"
- in: query
name: osm
type: string
required: false
description: Optional "OSM" filter - area within which the stop must be located. Area must be specified by a set of geo locations encoded as string input.
longitude and latitude values must be separated by a single semicolon ; i.e. 13.703963;15.374694
coordinates must be separated by two semicolons ;; i.e. 13.703963;15.374694;;13.703984;15.377439
Input Pattern:
longitude1;latitude1;;longitude2;latitude2;;longitude3;latitude3;;longitude4;lattitude4
Example Value
13.703963;15.374694;;13.703984;15.377439;;13.698338;15.374908;;13.698495;115.37755
- in: query
name: infrastructure
type: string
required: false
description: Optional "Infrastructure" filter - The name of an infrastrukture element, i.e. "Rampe"
responses:
'200':
description: ok
schema:
type: array
items:
$ref: '#/definitions/Stop'
'400':
description: Bad Request.
'401':
description: Authorization required.
'404':
description: Not found.
securityDefinitions:
ApiKey:
type: apiKey
name: x-api-key
in: header
definitions:
Stop:
title: Stop
allOf:
- $ref: '#/definitions/StopSummary'
- type: object
- properties:
infrastructure:
type: array
items:
$ref: '#/definitions/Infrastructure'
StopSummary:
title: StopSummary
type: object
required:
- ifopt
- subnet
- name
- place
properties:
ifopt:
type: string
description: The IFOPT number (global id) of the stop.
subnet:
type: string
description: The subnet of the stop, either "OPNV", "SPNV" or "OPNV / SPNV"
name:
type: string
description: The name of the stop.
place:
type: string
description: The place of the stop
latitude:
type: number
description: The latitude of this stop.
longitude:
type: number
description: The longitude of this stop.
Infrastructure:
title: Infrastructure
type: object
properties:
resourceId:
type: string
description: The resource identifier (Betriebsmittelnummer) of this infrastructure
type:
type: string
description: The type of the infrastructure
name:
type: string
description: The name of the infrastructure
description:
type: string
description: The description of the infrastructure
latitude:
type: number
description: The latitude of this infrastructure.
longitude:
type: number
description: The longitude of this infrastrucutre.
state:
$ref: '#/definitions/State'
State:
title: State
type: object
required:
- timestamp
- state
properties:
timestamp:
type: string
description: Timestamp of last state change (ISO 8601), i.e. 2019-03-31T16:45+00:00
state:
type: string
description: The most recent state of the infrastructure.
description:
type: string
description: The optional textual description of the most recent state of the infrastructure.