Flaky events is a RESTful web service for creating and showing events. It uses hypermedia to describe the relationships between resources and to allow navigation between them.
Flaky Events is written using Spring Boot which makes it easy to get it up and running so that you can start exploring the REST API.
The first step is to clone the Git repository:
$ git clone https://github.com/jsug-projects/flaky-events
Once the clone is complete, you’re ready to get the service up and running:
$ cd flaky-events
$ ./mvnw clean package
$ java -jar -Dspring.profiles.active=development target/*.jar
If you omit "development" profile, authorization needed as resource server. |
You can check that the service is up and running by executing a simple request using cURL:
$ curl 'http://localhost:8083/' -i -H 'Accept: application/hal+json'
This request should yield the following response in the Hypertext Application Language (HAL) format:
HTTP/1.1 200 OK Content-Type: application/hal+json;charset=UTF-8 Content-Length: 664
{ "_links" : { "sessions" : { "href" : "http://localhost:8083/sessions{?page,size,sort}", "templated" : true }, "events" : { "href" : "http://localhost:8083/events{?page,size,sort}", "templated" : true }, "speakers" : { "href" : "http://localhost:8083/speakers{?page,size,sort}", "templated" : true }, "attendees" : { "href" : "http://localhost:8083/attendees{?page,size,sort}", "templated" : true }, "attendances" : { "href" : "http://localhost:8083/attendances" }, "profile" : { "href" : "http://localhost:8083/profile" } } }
Note the _links
in the JSON response. They are key to navigating the API.
You can see api reference at http://localhost:8083/docs/api-guide.html .