This is a demo project written in Java with Spring Boot. It is a CRUD backend for people with very basic functionality. It uses
Creates a new person with given data
All fields are required.
POST /people
{
"name": "Akif",
"age": 28
}
A successful response will have 201 Created
status.
201 Created
{
"id": 1,
"name": "Akif",
"age": 28
}
Lists all people.
GET /people
Response payload will contain a Json array of all people.
200 OK
[
{
"id": 1,
"name": "Akif",
"age": 28
}
]
Gets a person with given id
GET /people/{id}
Response payload will contain a Json object of the person.
200 OK
{
"id": 1,
"name": "Akif",
"age": 28
}
Updates a person with given data
All fields are optional.
PUT /people/{id}
{
"name": "Mehmet Akif",
"age": 29
}
Response payload will contain a Json object of the person.
200 OK
{
"id": 1,
"name": "Mehmet Akif",
"age": 29
}
Deletes given person.
DELETE /people/{id}
Response payload will contain a Json object of the person.
200 OK
{
"id": 1,
"name": "Mehmet Akif",
"age": 29
}