REST API using Spring Boot
This document provides an overview of the Employee Management API, including endpoints, request/response formats, and example curl
commands for each operation.
The Employee Management API allows for creating, retrieving, updating, and deleting employee records. This API is implemented using Spring Boot and provides a set of RESTful endpoints to manage employee data.
- URL:
/api/create
- Method:
POST
- Status Code:
201 Created
- Request Body:
{ "firstName": "John", "lastName": "Doe", "mobileNumber": "123-456-7890", "email": "john.doe@example.com" }
- URL:
/api/get/all
- Method:
GET
- Response:
- Status:
200 OK
- Body:
[ { "id": 1, "firstName": "John", "lastName": "Doe", "mobileNumber": "123-456-7890", "email": "john.doe@example.com" }, { "id": 2, "firstName": "Jane", "lastName": "Smith", "mobileNumber": "987-654-3210", "email": "jane.smith@example.com" } ]
- Status:
- URL:
/api/get/{id}
- Method:
GET
- Path Variable:
id
(long) - Response:
- Status:
200 OK
- Body:
{ "id": 1, "firstName": "John", "lastName": "Doe", "mobileNumber": "123-456-7890", "email": "john.doe@example.com" }
- Status:
- URL:
/api/update/{id}
- Method:
PUT
- Path Variable:
id
(long) - Request Body:
{ "firstName": "John", "lastName": "Doe", "mobileNumber": "123-456-7890", "email": "john.doe@example.com" }
- URL:
/api/delete/{id}
- Method:
DELETE
- Path Variable:
id
(long) - Response:
- Status:
200 OK
- Body:
"Employee Record Deleted for ID: 1"
- Status: