MapHoles: Map for managing Manholes
Endpoints: Manhole, Employee, and Work Order. The http resource location is at: '/manhole', '/employee', and '/workorder'.
curl -X GET -H Content-Type:application/json http://0.0.0.0:5000/api/manhole?id=1
curl -X GET -H Content-Type:application/json http://0.0.0.0:5000/api/manhole?full=true
curl -X POST -H Content-Type:application/json -d '{"fname": "Luis", "department": "IT"}' http://0.0.0.0:5000/api/employee
curl -X PUT -H Content-Type:application/json -d '{"fname": "Luis", "department": "IT"}' http://0.0.0.0:5000/api/employee?id=1
curl -X PUT -H Content-Type:application/json -d '{"id":1, "employee_id": 36}' http://0.0.0.0:5000/api/workorder
The workorder endpoint is a special case. If there's anemployee_id
in the PUT request data, it will add it the list of employeesassigned_to
if the employee if not in the list, if it is in the list it will remove it.
curl -X DELETE -H Content-Type:application/json http://0.0.0.0:5000/api/manhole?id=1