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.

Schema

Index

Response fields

Path Type Description

_links

Object

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"
    }
  }
}
Relation Description

employees

See Employee

persons

See Person

stations

See Station

tickets

See Ticket

trains

See Train

profile

The Application-Level Profile Semantics (ALPS)

Error

Response fields

Path Type Description

error

String

The HTTP status code that occurred

message

String

A massage like Bad Request

path

String

The path to which the request was made

status

Number

The HTTP status code like 400

timestamp

Number

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"
}