Course-Api is a simple REST service for Topics and Courses.
- Etag support for resources.
- Precise HTTP response codes.
- In memory DB support - Apache Derby
- Java 1.8.0_221
- Apache Maven 3.5.4
Two controllers are available on this project - Topic and Course. A Topic can have multiple Courses [just like in a college]
HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. The following methods are supported by the Api for Topic controller -
GET
http://localhost:8080/topics/
GET
http://localhost:8080/topics/Java/
POST
URL
http://localhost:8080/topics/
Header
Content-Type = Application/Json
Body
{ "id": "OS", "name": "Operating Systems and the Kernal", "description": "Operating Systems tutorial" }
PUT
URL
http://localhost:8080/topics/OS
Header
Content-Type = Application/Json
Body
{ "id": "OS", "name": "Operating Systems", "description": "Operating Systems tutorial" }
DELETE
http://localhost:8080/topics/OS
The following methods are supported by the Api for Courses controller -
GET
http://localhost:8080/topics/OS/courses/
GET
http://localhost:8080/topics/OS/courses/Scheduling
POST
URL
http://localhost:8080/topics/OS/courses
Header
Content-Type = Application/Json
Body
{ "id": "Scheduling", "name": "Process scheduling", "description": "Process scheduling tutorial" }
PUT
URL
http://localhost:8080/topics/OS/courses/Scheduling
Header
Content-Type = Application/Json
Body
{ "id": "Scheduling", "name": "Process scheduling and operations", "description": "Process scheduling tutorial" }
DELETE
http://localhost:8080/topics/OS/courses/Scheduling
UI DOCS
http://localhost:8080/course-api/swagger-ui.html
JSON DOCS
http://localhost:8080/course-api/v2/api-docs
