Create new Car
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car' -i -X POST \
-H 'Content-Type: application/json' \
-d '{
"kennzeichen" : "LEO-MS 1235",
"kilometer" : 132125,
"name" : "audo"
}'
Request fields
| Path | Type | Description |
|---|---|---|
|
|
License plate |
|
|
total kilometers |
|
|
personal name of car |
HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Location: /car/4432fc47-395a-4033-b167-00e37a7785a0
Get one Car
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car/de1fc099-81c9-43cf-8efb-51d968af02e5' -i -X GET
Path parameters
| Parameter | Description |
|---|---|
|
ID of the car you want to get information about |
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: 931
{
"id" : "de1fc099-81c9-43cf-8efb-51d968af02e5",
"kennzeichen" : "LEO-MS 1234",
"kilometer" : 123123,
"name" : "",
"routes" : [ {
"id" : "e53eb99b-9ce1-4c41-bd59-fa503c8bded9",
"startMileage" : 123123,
"endMileage" : null,
"destination" : null,
"reason" : null
} ],
"fuelUps" : [ {
"id" : "cdc4125c-d7b6-499c-ae38-66cab9f82017",
"liter" : 50,
"mileage" : 200000,
"costs" : 70.0,
"filledUp" : true
} ],
"additionalCosts" : [ {
"id" : "539d051f-d812-4ebd-bb31-72536275cfbf",
"type" : "OTHER",
"costs" : 20.0,
"mileage" : null
} ],
"users" : [ {
"id" : "b07620cc-c258-4e12-8ce7-7b77d992f35f",
"providers" : [ {
"provider" : "local",
"profileUri" : "local/profile/id"
} ],
"email" : "test@test.test",
"nickname" : "test",
"name" : "Test Test",
"pictureUri" : "picture/test"
} ]
}
Response body
{
"id" : "de1fc099-81c9-43cf-8efb-51d968af02e5",
"kennzeichen" : "LEO-MS 1234",
"kilometer" : 123123,
"name" : "",
"routes" : [ {
"id" : "e53eb99b-9ce1-4c41-bd59-fa503c8bded9",
"startMileage" : 123123,
"endMileage" : null,
"destination" : null,
"reason" : null
} ],
"fuelUps" : [ {
"id" : "cdc4125c-d7b6-499c-ae38-66cab9f82017",
"liter" : 50,
"mileage" : 200000,
"costs" : 70.0,
"filledUp" : true
} ],
"additionalCosts" : [ {
"id" : "539d051f-d812-4ebd-bb31-72536275cfbf",
"type" : "OTHER",
"costs" : 20.0,
"mileage" : null
} ],
"users" : [ {
"id" : "b07620cc-c258-4e12-8ce7-7b77d992f35f",
"providers" : [ {
"provider" : "local",
"profileUri" : "local/profile/id"
} ],
"email" : "test@test.test",
"nickname" : "test",
"name" : "Test Test",
"pictureUri" : "picture/test"
} ]
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
id of the car |
|
|
License plate |
|
|
total kilometers |
|
|
name of the car |
|
|
List of driven routes |
|
|
List of gas ups |
|
|
List of additional Costs |
|
|
Users of this car |
|
|
Internal id of user |
|
|
Email of user |
|
|
Nickname of user |
|
|
Full Name of user |
|
|
Uri of picture to use |
|
|
Array of providers where user is authenticated |
|
|
Id of the provider |
|
|
Uri of the user for provider |
|
|
Routes driven with this car |
|
|
id of route |
|
|
Mileage at start |
|
|
Mileage at end |
|
|
Destination of route |
|
|
Reason of route |
|
|
Fuelm Ups for car |
|
|
ID of fuel up entry |
|
|
Liters fueled in |
|
|
Overall kilometers aat time fueled up |
|
|
Costs to fuel up |
|
|
Filled up to full tank? |
|
|
Array of costs for car |
|
|
Id of costs |
|
|
Type of costs |
|
|
Costs |
|
|
Mileage at time of costs |
Get all Cars
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car' -i -X GET
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: 998
[ {
"id" : "de1fc099-81c9-43cf-8efb-51d968af02e5",
"kennzeichen" : "LEO-MS 1234",
"kilometer" : 123123,
"name" : "",
"routes" : [ ],
"fuelUps" : [ ],
"additionalCosts" : [ ],
"users" : [ {
"id" : "b07620cc-c258-4e12-8ce7-7b77d992f35f",
"providers" : [ {
"provider" : "local",
"profileUri" : "local/profile/id"
} ],
"email" : "test@test.test",
"nickname" : "test",
"name" : "Test Test",
"pictureUri" : "picture/test"
} ]
}, {
"id" : "4432fc47-395a-4033-b167-00e37a7785a0",
"kennzeichen" : "LEO-MS 1235",
"kilometer" : 132125,
"name" : "",
"routes" : [ ],
"fuelUps" : [ ],
"additionalCosts" : [ ],
"users" : [ {
"id" : "b07620cc-c258-4e12-8ce7-7b77d992f35f",
"providers" : [ {
"provider" : "local",
"profileUri" : "local/profile/id"
} ],
"email" : "test@test.test",
"nickname" : "test",
"name" : "Test Test",
"pictureUri" : "picture/test"
} ]
} ]
Response body
[ {
"id" : "de1fc099-81c9-43cf-8efb-51d968af02e5",
"kennzeichen" : "LEO-MS 1234",
"kilometer" : 123123,
"name" : "",
"routes" : [ ],
"fuelUps" : [ ],
"additionalCosts" : [ ],
"users" : [ {
"id" : "b07620cc-c258-4e12-8ce7-7b77d992f35f",
"providers" : [ {
"provider" : "local",
"profileUri" : "local/profile/id"
} ],
"email" : "test@test.test",
"nickname" : "test",
"name" : "Test Test",
"pictureUri" : "picture/test"
} ]
}, {
"id" : "4432fc47-395a-4033-b167-00e37a7785a0",
"kennzeichen" : "LEO-MS 1235",
"kilometer" : 132125,
"name" : "",
"routes" : [ ],
"fuelUps" : [ ],
"additionalCosts" : [ ],
"users" : [ {
"id" : "b07620cc-c258-4e12-8ce7-7b77d992f35f",
"providers" : [ {
"provider" : "local",
"profileUri" : "local/profile/id"
} ],
"email" : "test@test.test",
"nickname" : "test",
"name" : "Test Test",
"pictureUri" : "picture/test"
} ]
} ]
Response fields
| Path | Type | Description |
|---|---|---|
|
|
id of the car |
|
|
License plate |
|
|
total kilometers |
|
|
name of the car |
|
|
List of driven routes |
|
|
List of gas ups |
|
|
List of additional Costs |
|
|
Users of this car |
|
|
Internal id of user |
|
|
Email of user |
|
|
Nickname of user |
|
|
Full Name of user |
|
|
Uri of picture to use |
|
|
Array of providers where user is authenticated |
|
|
Id of the provider |
|
|
Uri of the user for provider |
|
|
Routes driven with this car |
|
|
id of route |
|
|
Mileage at start |
|
|
Mileage at end |
|
|
Destination of route |
|
|
Reason of route |
|
|
Fuelm Ups for car |
|
|
ID of fuel up entry |
|
|
Liters fueled in |
|
|
Overall kilometers aat time fueled up |
|
|
Costs to fuel up |
|
|
Filled up to full tank? |
|
|
Array of costs for car |
|
|
Id of costs |
|
|
Type of costs |
|
|
Costs |
|
|
Mileage at time of costs |
Update Car
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car/de1fc099-81c9-43cf-8efb-51d968af02e5' -i -X POST \
-H 'Content-Type: application/json' \
-d '{
"kennzeichen" : "LEO-MS 1234",
"kilometer" : 123125,
"name" : "Auddole"
}'
Path parameters
| Parameter | Description |
|---|---|
|
Id of car to update |
Request body
{
"kennzeichen" : "LEO-MS 1234",
"kilometer" : 123125,
"name" : "Auddole"
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
License plate |
|
|
total kilometers |
|
|
personal name of car |
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: 496
{
"id" : "de1fc099-81c9-43cf-8efb-51d968af02e5",
"kennzeichen" : "LEO-MS 1234",
"kilometer" : 123125,
"name" : "",
"routes" : [ ],
"fuelUps" : [ ],
"additionalCosts" : [ ],
"users" : [ {
"id" : "b07620cc-c258-4e12-8ce7-7b77d992f35f",
"providers" : [ {
"provider" : "local",
"profileUri" : "local/profile/id"
} ],
"email" : "test@test.test",
"nickname" : "test",
"name" : "Test Test",
"pictureUri" : "picture/test"
} ]
}
Response body
{
"id" : "de1fc099-81c9-43cf-8efb-51d968af02e5",
"kennzeichen" : "LEO-MS 1234",
"kilometer" : 123125,
"name" : "",
"routes" : [ ],
"fuelUps" : [ ],
"additionalCosts" : [ ],
"users" : [ {
"id" : "b07620cc-c258-4e12-8ce7-7b77d992f35f",
"providers" : [ {
"provider" : "local",
"profileUri" : "local/profile/id"
} ],
"email" : "test@test.test",
"nickname" : "test",
"name" : "Test Test",
"pictureUri" : "picture/test"
} ]
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
id of the car |
|
|
License plate |
|
|
total kilometers |
|
|
name of the car |
|
|
List of driven routes |
|
|
List of gas ups |
|
|
List of additional Costs |
|
|
Users of this car |
|
|
Internal id of user |
|
|
Email of user |
|
|
Nickname of user |
|
|
Full Name of user |
|
|
Uri of picture to use |
|
|
Array of providers where user is authenticated |
|
|
Id of the provider |
|
|
Uri of the user for provider |
|
|
Routes driven with this car |
|
|
id of route |
|
|
Mileage at start |
|
|
Mileage at end |
|
|
Destination of route |
|
|
Reason of route |
|
|
Fuelm Ups for car |
|
|
ID of fuel up entry |
|
|
Liters fueled in |
|
|
Overall kilometers aat time fueled up |
|
|
Costs to fuel up |
|
|
Filled up to full tank? |
|
|
Array of costs for car |
|
|
Id of costs |
|
|
Type of costs |
|
|
Costs |
|
|
Mileage at time of costs |
Delete Car
Curl request
$ curl 'https://logbook.stainhaufen.de/api/car/de1fc099-81c9-43cf-8efb-51d968af02e5' -i -X DELETE
Path parameters
| Parameter | Description |
|---|---|
|
Id of car to delete |
HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers