https://github.com/josevte/template-api-rest-java-playframework
API REST with Play Framework in JAVA
https://github.com/josevte/template-api-rest-java-playframework
Last synced: 5 months ago
JSON representation
API REST with Play Framework in JAVA
- Host: GitHub
- URL: https://github.com/josevte/template-api-rest-java-playframework
- Owner: JoseVte
- License: other
- Created: 2015-10-17T13:47:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-21T20:34:04.000Z (over 9 years ago)
- Last Synced: 2023-04-12T18:30:57.320Z (about 2 years ago)
- Language: Java
- Size: 1.16 MB
- Stars: 22
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
API REST for JAVA Play Framework
================================-----
Welcome to a API REST with Play Framework in JAVA.
For test the API you can use the file extracted from PostMan or use these URIs in your Rest Client.
All routes have the port 80. This can be changed in `application.conf` file.
| Method | URI | Data | HTTP Code | Response (in JSON) |
| ------ | --- | ---- | --------- | ------------------ |
| GET | /employees?page=2 | | 200 | {"data":[{"id": 4,"name": "Josrom"},{"id": 4,"name": "Dantar"},...],"total":∞,"link-self": "/employees?page=2","link-prev": "/employees?page=1","link-next": "/employees?page=3"} |
| GET | /employees/1 | | 200 | {"id": 1,"name": "Josrom"} |
| GET | /employees/6 | | 404 | {"error":"Not found 6"} |
| POST | /employees | {"name": "new user"} | 201 | {"id": 6,"name": "new user"} |
| POST | /employees | | 400 | {"name": ["This field is required"]} |
| PUT/PATCH | /employees | {"id": 1,"name": "new name"} | 200 | {"id": 1,"name": "new name"} |
| PUT/PATCH | /employees | | 400 | {"name": ["This field is required"]} |
| DELETE | /employees/1 | | 200 | {"msg":"Deleted 1"} |
| DELETE | /employees/0 | | 404 | {"error":"Not found 0"} |CHANGELOG
=========## Version 1.1
- Changed Ebean ORM for JPA
- Added pagination
- Docblocks for all methods
- Added test## Version 1.0
- App base