Resource | Authorization | Get(read) | Post(store) | Put(update) | Delete(destroy) |
api/v1/employees | Admin, manager | Show list of employees | create an employee | ||
api/v1/employees/{id} | Get-> all | Show an employee | Update an employee | Delete an employee | |
Put, delete->admin, manager | |||||
api/v1/employees/{id}/upload | All | Import files | Upload files | ||
api/v1/employees/search?first-name=example,lastname=example | Admin, manager | Search by first name or last name | |||
api/v1/employees/?state=on | Admin, manager | Show lists of employees who are currently online | |||
api/v1/employees/{id}/addresses | Admin, manager | Show an address of the employee | Create an address of the employee | ||
api/v1/employees/{id}/addresses/{id} | Admin, manager | Update an address | Delete an address | ||
api/v1/employees/{id}/positions | Admin, manager | Show a position of the employee | Create a position for an employee | ||
api/v1/employees/{id}/positions/{id} | Admin, manager | Update a position information | Delete a position |
요청받을때 전달하는 파라미터 명시가 있으면 좋을것 같네요.