more work!
This commit is contained in:
27
api.MD
27
api.MD
@ -1,14 +1,33 @@
|
||||
//location
|
||||
//get all
|
||||
curl localhost/api/v0/location
|
||||
|
||||
//get id
|
||||
curl localhost/api/v0/1
|
||||
http://localhost/api/v0/location/3
|
||||
|
||||
//post
|
||||
curl localhost/api/v0/add-location -H "Content-Type: application/json" -X POST -d '{"name": "test", "added_by": "noot" , "description": "test"}'
|
||||
curl localhost/api/v0/location/new -H "Content-Type: application/json" -X POST -d '{"name": "test", "added_by": "noot" , "description": "test"}'
|
||||
|
||||
//put
|
||||
curl localhost/api/v0/update-location -X PUT -H "Content-Type: application/json" -d '{"id": "1" , "name": "test", "added_by": "noot", "description": "test123"}'
|
||||
curl localhost/api/v0/location/update -X PUT -H "Content-Type: application/json" -d '{"id": "2" , "name": "test", "added_by": "noot", "description": "test12344444444"}'
|
||||
|
||||
//delete
|
||||
curl localhost/api/v0/delete-location -X DELETE -H "Content-Type: application/json" -d '{"id": "1" }'
|
||||
curl localhost/api/v0/location/delete -X DELETE -H "Content-Type: application/json" -d '{"id": "6" }'
|
||||
|
||||
//sensor
|
||||
//GET all
|
||||
curl localhost/api/v0/sensor
|
||||
|
||||
//get id
|
||||
curl http://localhost/api/v0/sensor/3
|
||||
|
||||
//POST
|
||||
curl localhost/api/v0/sensor/new -H "Content-Type: application/json" -X POST -d '{"sensortype": "test", "added_by": "noot" , "description": "test" , "location": "2"}'
|
||||
|
||||
//put
|
||||
curl localhost/api/v0/sensor/update -H "Content-Type: application/json" -X PUT -d '{"id": "2" ,"sensortype": "test", "added_by": "noot" , "description": "test123333333" , "location": "3" }'
|
||||
|
||||
//delete
|
||||
curl localhost/api/v0/sensor/delete -X DELETE -H "Content-Type: application/json" -d '{"id": "2" }'
|
||||
|
||||
//sensor data
|
||||
|
Reference in New Issue
Block a user