Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weitere API-Endpunkte #25

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 167 additions & 16 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ info:
description: |
Was passiert auf Deutschlands Bundesstraßen? API für aktuelle Verwaltungsdaten zu Baustellen, Staus und Ladestationen. Außerdem Zugang zu Verkehrsüberwachungskameras und vielen weiteren Datensätzen.
servers:
- url: https://verkehr.autobahn.de/o/autobahn
- url: https://verkehr.autobahn.de/o

paths:

/:
/autobahn:
get:
operationId: list-autobahnen
summary: Liste verfügbarer Autobahnen
Expand All @@ -22,7 +22,20 @@ paths:
schema:
$ref: "#/components/schemas/Roads"

/{roadId}/services/roadworks:
/services/roadworks:
get:
operationId: list-roadworks-all
summary: Liste verfügbarer Autobahnen mit aktuellen Baustellen
description: Gibt eine Liste der verfügbaren Autobahnen mit aktuellen Baustellen zurück.
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/RoadsAffected"

/autobahn/{roadId}/services/roadworks:
get:
operationId: list-roadworks
summary: Liste aktueller Baustellen
Expand All @@ -47,7 +60,7 @@ paths:
"404":
description: Not found.

/details/roadworks/{roadworkId}:
/autobahn/details/roadworks/{roadworkId}:
get:
operationId: get-roadwork
summary: Details einer Baustelle
Expand All @@ -74,7 +87,7 @@ paths:
"404":
description: Not found.

/{roadId}/services/webcam:
/autobahn/{roadId}/services/webcam:
get:
operationId: list-webcams
summary: Liste verfügbarer Webcams
Expand All @@ -100,7 +113,7 @@ paths:
description: Not found.

# https://verkehr.autobahn.de/o/autobahn/details/webcam/%5BID%5D
/details/webcam/{webcamId}:
/autobahn/details/webcam/{webcamId}:
get:
operationId: get-webcam
summary: Details einer Webcam
Expand All @@ -127,9 +140,22 @@ paths:
"404":
description: Not found.

/{roadId}/services/parking_lorry:
/services/parking:
get:
operationId: list-parking-lorries
operationId: list-parking-all
summary: Liste verfügbarer Autobahnen mit Rastplätzen
description: Gibt eine Liste der verfügbaren Autobahnen mit Rastplätzen zurück.
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/RoadsAffected"

/autobahn/{roadId}/services/parking:
get:
operationId: list-parkings
summary: Liste verfügbarer Rastplätze
description: Gibt eine Liste der Rastplätze zu einer Autobahn zurück.
parameters:
Expand All @@ -152,11 +178,76 @@ paths:
"404":
description: Not found.

/details/parking_lorry/{lorryId}:
/autobahn/details/parking/{parkingId}:
get:
operationId: get-parking-lorry
operationId: get-parking
summary: Details eines Rastplatzes
description: Gibt Details eines konkreten Rastplatzes zurück.
parameters:
- name: parkingId
in: path
required: true
schema:
type: string
format: byte
example: "UEFSS0lOR19fbWRtLmxvcnJ5LnBhcmtpbmdfX0RFLVNILTAwMTEwOA=="
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/ParkingLorry"
"204":
description: Not found.
"400":
description: Internal server error.
"404":
description: Not found.

/services/parking_lorry:
get:
operationId: list-parking-lorry-all
summary: Liste verfügbarer Autobahnen mit Lkw-Rastplätzen
description: Gibt eine Liste der verfügbaren Autobahnen mit Lkw-Rastplätzen zurück.
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/RoadsAffected"

/autobahn/{roadId}/services/parking_lorry:
get:
operationId: list-parking-lorries
summary: Liste verfügbarer Lkw-Rastplätze
description: Gibt eine Liste der Lkw-Rastplätze zu einer Autobahn zurück.
parameters:
- name: roadId
in: path
required: true
schema:
$ref: "#/components/schemas/RoadId"
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/ParkingLorries"
"204":
description: Not found.
"400":
description: Internal server error.
"404":
description: Not found.

/autobahn/details/parking_lorry/{lorryId}:
get:
operationId: get-parking-lorry
summary: Details eines Lkw-Rastplatzes
description: Gibt Details eines konkreten Lkw-Rastplatzes zurück.
parameters:
- name: lorryId
in: path
Expand All @@ -179,7 +270,20 @@ paths:
"404":
description: Not found.

/{roadId}/services/warning:
/services/warning:
get:
operationId: list-warning-all
summary: Liste verfügbarer Autobahnen mit Verkehrsmeldungen
description: Gibt eine Liste der verfügbaren Autobahnen mit Verkehrsmeldungen zurück.
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/RoadsAffected"

/autobahn/{roadId}/services/warning:
get:
operationId: list-warnings
summary: Liste aktueller Verkehrsmeldungen
Expand All @@ -204,7 +308,7 @@ paths:
"404":
description: Not found.

/details/warning/{warningId}:
/autobahn/details/warning/{warningId}:
get:
operationId: get-warning
summary: Details zu einer Verkehrsmeldung
Expand All @@ -231,7 +335,20 @@ paths:
"404":
description: Not found.

/{roadId}/services/closure:
/services/closure:
get:
operationId: list-closures-all
summary: Liste verfügbarer Autobahnen mit aktuellen Sperrungen
description: Gibt eine Liste der verfügbaren Autobahnen mit aktuellen Sperrungen zurück.
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/RoadsAffected"

/autobahn/{roadId}/services/closure:
get:
operationId: list-closures
summary: Liste aktueller Sperrungen
Expand All @@ -256,7 +373,7 @@ paths:
"404":
description: Not found.

/details/closure/{closureId}:
/autobahn/details/closure/{closureId}:
get:
operationId: get-closure
summary: Details zu einer Sperrung
Expand All @@ -283,7 +400,20 @@ paths:
"404":
description: Not found.

/{roadId}/services/electric_charging_station:
/services/electric_charging_station:
get:
operationId: list-charging-stations-all
summary: Liste verfügbarer Autobahnen mit Ladestationen
description: Gibt eine Liste der verfügbaren Autobahnen mit Ladestationen zurück.
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/RoadsAffected"

/autobahn/{roadId}/services/electric_charging_station:
get:
operationId: list-charging-stations
summary: Liste aktueller Ladestationen
Expand All @@ -308,7 +438,7 @@ paths:
"404":
description: Not found.

/details/electric_charging_station/{stationId}:
/autobahn/details/electric_charging_station/{stationId}:
get:
operationId: get-charging-station
summary: Details zu einer Ladestation
Expand Down Expand Up @@ -351,6 +481,27 @@ components:
pattern: 'A[1-9]([0-9]{1,3})?(\/A[1-9]{1,3})?'
example: "A1"

RoadsAffected:
type: object
properties:
roadCounter:
type: array
items:
$ref: '#/components/schemas/RoadCounter'

RoadCounter:
type: object
example: {
"road": "A1",
"counter": "99"
}
properties:
road:
$ref: '#/components/schemas/RoadId'
counter:
type: string
pattern: '\d+'

Extent:
type: string
pattern: '-?\d+(?:\.\d+)?,\s*-?\d+(?:\.\d+)?,\s*-?\d+(?:\.\d+)?,\s*-?\d+(?:\.\d+)?'
Expand Down
Loading