API Document Exa
API Document Exa
This API will be retrieving all employee’s data from the table and return information that
included name, salary, and age.
URL https://sangbui.com/api/v1/employees
Method GET
Content-Type: application/json
Header
Authorization: Basic d2ViX2FwcDpjaGFuZ2VpdA==
“id”: “<id>”,
“employee_name”: “<name>”,
“employee_salary”: “<salary>”,
“employee_age”: “<age>”
},
“id”: “<id>”,
“employee_name”: “<name>”,
“employee_salary”: “<salary>”,
“employee_age”: “<age>”
Notes <none>
This API will support for adding the new employee to the database. The employee_id
will be auto increment. Check the new submitted records at the home page. It will show
10 latest records and all value from the employee table.
URL https://sangbui.com/api/v1/employees
Method POST
URL Params <none>
Content-Type: application/json
Header
Authorization: Basic d2ViX2FwcDpjaGFuZ2VpdA==
{
“employee_name” : “<name>”,
“employee_salary”: “<salary>”,
Data Params
“employee_age”: “<age>”
Code: 200 OK
Content:
Sample Call {
“employee_name” : “An”,
“employee_salary”: “1000”,
“employee_age”: “29”
Notes Check the new submitted records ID and details at the home page.