All responses will have the form
{
"data": "Mixed type holding the content of the response",
"message": "Description of what happened"
}Subsequent response definitions will only detail the expected value of the data field
Definitions
GET /employees
Responce
200 OKon success
[
{
"ssid": "111111111",
"name": "John Smith",
"role": "CEO"
},
{
"ssid": "222222222",
"name": "Jane Smith",
"role": "CFO"
}
]Definition
POST /employees
Arguments
"ssid":stringa 9 digit social security nuber"name":stringthe full name of the employee"role":stringthe name of the job they currently hold
If a employee with the given ssid already exists, it will be overwritten with the new data.
Response
201 Createdon success
{
"ssid": "111111111",
"name": "John Smith",
"role": "CEO"
}GET /employee/<ssid>
Responce
404 Not Foundif the employee with the given ssid does not exist in the database200 OKon success
{
"ssid": "111111111",
"name": "John Smith",
"role": "CEO"
}Definition
DELETE /employee/<ssid>
404 Not Foundif the employee with the given ssid does not exist in the database204 No Contentif the employee was deleted succsessfully