Fuel Up Car
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/fuelup' -i -X POST \
-H 'Content-Type: application/json' \
-d '{
"liter" : 60,
"mileage" : 123124,
"costs" : 80.0,
"filledUp" : true
}'
Path parameters
| Parameter | Description |
|---|---|
|
Car which gets fueled up |
Request body
{
"liter" : 60,
"mileage" : 123124,
"costs" : 80.0,
"filledUp" : true
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
Liters fueled in |
|
|
Overall kilometers aat time fueled up |
|
|
Costs to fuel up |
|
|
Filled up to full tank? |
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/gasup/5f266b0b-aba1-4790-9b04-dc4e6d385a40
Get one Fuel Up
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/fuelup/9ebc4885-9b29-4633-94b9-23b401efe022' -i -X GET
Path parameters
| Parameter | Description |
|---|---|
|
Car which gets fueled up |
|
FuelUp you want to update |
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: 134
{
"id" : "9ebc4885-9b29-4633-94b9-23b401efe022",
"liter" : 60,
"mileage" : 123127,
"costs" : 80.0,
"filledUp" : true
}
Response body
{
"id" : "9ebc4885-9b29-4633-94b9-23b401efe022",
"liter" : 60,
"mileage" : 123127,
"costs" : 80.0,
"filledUp" : true
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
ID of fuel up entry |
|
|
Liters fueled in |
|
|
Overall kilometers aat time fueled up |
|
|
Costs to fuel up |
|
|
Filled up to full tank? |
Get all Fuel Up
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/fuelup' -i -X GET
Path parameters
| Parameter | Description |
|---|---|
|
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: 138
[ {
"id" : "7ff0ce6c-3c0e-47ae-96cb-32542303ea64",
"liter" : 60,
"mileage" : 123125,
"costs" : 80.0,
"filledUp" : true
} ]
Response body
[ {
"id" : "7ff0ce6c-3c0e-47ae-96cb-32542303ea64",
"liter" : 60,
"mileage" : 123125,
"costs" : 80.0,
"filledUp" : true
} ]
Response fields
| Path | Type | Description |
|---|---|---|
|
|
array of fuel ups |
|
|
ID of fuel up entry |
|
|
Liters fueled in |
|
|
Overall kilometers aat time fueled up |
|
|
Costs to fuel up |
|
|
Filled up to full tank? |
Update Fuel Up
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/fuelup/48cd1e14-8f71-406a-aa2f-690824344821' -i -X POST \
-H 'Content-Type: application/json' \
-d '{
"liter" : 60,
"mileage" : 123127,
"costs" : 80.0,
"filledUp" : true
}'
Path parameters
| Parameter | Description |
|---|---|
|
Car which gets fueled up |
|
FuelUp you want to update |
Request body
{
"liter" : 60,
"mileage" : 123127,
"costs" : 80.0,
"filledUp" : true
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
Liters fueled in |
|
|
Overall kilometers aat time fueled up |
|
|
Costs to fuel up |
|
|
Filled up to full tank? |
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: 134
{
"id" : "48cd1e14-8f71-406a-aa2f-690824344821",
"liter" : 60,
"mileage" : 123127,
"costs" : 80.0,
"filledUp" : true
}
Response body
{
"id" : "48cd1e14-8f71-406a-aa2f-690824344821",
"liter" : 60,
"mileage" : 123127,
"costs" : 80.0,
"filledUp" : true
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
ID of fuel up entry |
|
|
Liters fueled in |
|
|
Overall kilometers aat time fueled up |
|
|
Costs to fuel up |
|
|
Filled up to full tank? |
Delete Fuel Up
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/fuelup/2c43726d-8173-471e-8e6c-110cde511731' -i -X DELETE
Path parameters
| Parameter | Description |
|---|---|
|
Car which gets fueled up |
|
FuelUp you want to update |
Request body
HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Last Fuel consumption average
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/fuelup/lastaverage' -i -X GET
Path parameters
| Parameter | Description |
|---|---|
|
Car which got 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: 121
{
"car" : "afef63fc-65bc-4310-bc5d-0bc755b8a4fc",
"mileage" : 800,
"totalFuel" : 120,
"averageFuel" : 15.0
}
Response body
{
"car" : "afef63fc-65bc-4310-bc5d-0bc755b8a4fc",
"mileage" : 800,
"totalFuel" : 120,
"averageFuel" : 15.0
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Id of car |
|
|
mileage for average |
|
|
Total fuel used |
|
|
Fuel per 100 kilometers |
Total Fuel consumption average
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car/afef63fc-65bc-4310-bc5d-0bc755b8a4fc/fuelup/totalaverage' -i -X GET
Path parameters
| Parameter | Description |
|---|---|
|
Car which got 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: 122
{
"car" : "afef63fc-65bc-4310-bc5d-0bc755b8a4fc",
"mileage" : 2600,
"totalFuel" : 260,
"averageFuel" : 10.0
}
Response body
{
"car" : "afef63fc-65bc-4310-bc5d-0bc755b8a4fc",
"mileage" : 2600,
"totalFuel" : 260,
"averageFuel" : 10.0
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Id of car |
|
|
mileage for average |
|
|
Total fuel used |
|
|
Fuel per 100 kilometers |