Start Route

Curl request

$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/route/start' -i -X POST

Path parameters

Table 1. /api/car/{carId}/route/start
Parameter Description

carId

Car which gets fueled up

HTTP response

HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Location: /car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/route/681135cc-f70a-4916-932e-76fafe344d03

End Route

Curl request

$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/route/end' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '{
  "destination" : "Ziel",
  "reason" : "Grund",
  "mileage" : 123173
}'

Path parameters

Table 1. /api/car/{carId}/route/end
Parameter Description

carId

Car which gets fueled up

HTTP request

POST /api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/route/end HTTP/1.1
Content-Type: application/json
Content-Length: 76
Host: logbook.stainhaufen.de

{
  "destination" : "Ziel",
  "reason" : "Grund",
  "mileage" : 123173
}

Request fields

Path Type Description

mileage

Number

Mileage at end

destination

String

Destination of route

reason

String

Reason of route

HTTP response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers

Get Route

Curl request

$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/route/5dade0f8-12f3-4fca-92cb-6d1440d2e024' -i -X GET

Path parameters

Table 1. /api/car/{carId}/route/{routeId}
Parameter Description

carId

Car for which the route should be retrieved

routeId

Route to retrieve

HTTP response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 157

{
  "id" : "5dade0f8-12f3-4fca-92cb-6d1440d2e024",
  "startMileage" : 123123,
  "endMileage" : 123143,
  "destination" : "Ziel",
  "reason" : "Grund"
}

Response body

{
  "id" : "5dade0f8-12f3-4fca-92cb-6d1440d2e024",
  "startMileage" : 123123,
  "endMileage" : 123143,
  "destination" : "Ziel",
  "reason" : "Grund"
}

Response fields

Path Type Description

id

UUID

id of route

startMileage

Number

Mileage at start

endMileage

Number

Mileage at end

destination

String

Destination of route

reason

String

Reason of route

Get all Routes

Curl request

$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/route/' -i -X GET

Path parameters

Table 1. /api/car/{carId}/route/
Parameter Description

carId

Car which gets fueled up

HTTP response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 161

[ {
  "id" : "d496f548-5cb1-4645-b3ac-d378889c3cd7",
  "startMileage" : 123123,
  "endMileage" : 123143,
  "destination" : "Ziel",
  "reason" : "Grund"
} ]

Response body

[ {
  "id" : "d496f548-5cb1-4645-b3ac-d378889c3cd7",
  "startMileage" : 123123,
  "endMileage" : 123143,
  "destination" : "Ziel",
  "reason" : "Grund"
} ]

Response fields

Path Type Description

[]

Array

List of routes

[].id

UUID

id of route

[].startMileage

Number

Mileage at start

[].endMileage

Number

Mileage at end

[].destination

String

Destination of route

[].reason

String

Reason of route

Delete Route

Curl request

$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/route/ab26006f-a9a5-4a7d-81d0-0c6094f19f21' -i -X DELETE

Path parameters

Table 1. /api/car/{carId}/route/{routeId}
Parameter Description

carId

Car for which the route should be retrieved

routeId

Route to retrieve

HTTP response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers