This API uses HAL / Spring HATEOAS. If you are unfamiliar with Level 3 - Hypermedia Controls then I highly recommend to watch this video before you explore the documentation. |
Index
Response fields
Path | Type | Description |
---|---|---|
|
|
Links to other resources |
Example request
$ curl 'http://demo.livingfire.local/api' -i
Example response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 738
{
"_links" : {
"employees" : {
"href" : "http://demo.livingfire.local/api/employees{?page,size,sort}",
"templated" : true
},
"trains" : {
"href" : "http://demo.livingfire.local/api/trains{?page,size,sort}",
"templated" : true
},
"stations" : {
"href" : "http://demo.livingfire.local/api/stations{?page,size,sort}",
"templated" : true
},
"tickets" : {
"href" : "http://demo.livingfire.local/api/tickets{?page,size,sort}",
"templated" : true
},
"persons" : {
"href" : "http://demo.livingfire.local/api/persons{?page,size,sort}",
"templated" : true
},
"profile" : {
"href" : "http://demo.livingfire.local/api/profile"
}
}
}
Error
Response fields
Path | Type | Description |
---|---|---|
|
|
The HTTP status code that occurred |
|
|
A massage like |
|
|
The path to which the request was made |
|
|
The HTTP status code like |
|
|
The time in milliseconds at which the error occurred |
Example request
$ curl 'http://demo.livingfire.local/error' -i
Example response
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Content-Length: 140
{
"timestamp" : 1508601662344,
"status" : 400,
"error" : "Bad Request",
"message" : "Bad Request",
"path" : "/repository/fooBar"
}