Creates and adds one new employee to the db
-
URL
/addEmployee
-
Method:
POST
-
URL Params
None
-
Data Params
Required:
name = [string]
dob = [date]
salary = [numeric]
skills = [string[]] - Can be empty array
photo = [file] - jpg or png only. < 10 MB in sizeOptional:
None
-
Success Response:
- Code: 201
Content:{ message : Employee Added Successfully, employee : employee record }
- Code: 201
-
Error Response:
- Code: 500 DB CONNECTION FAILED
Content:{ error : "DB CONNECTION FAILED" }
OR
- Code: 422 UNPROCESSABLE ENTRY
Content:{ error : "Validation Failed" }
- Code: 500 DB CONNECTION FAILED