Files
services/location/examples.json
Dominic Wong 5c998951a1 run check bool
2021-09-09 13:56:52 +01:00

64 lines
1.5 KiB
JSON

{
"save": [{
"title": "Save an entity",
"description": "Save the location of an entity",
"run_check": true,
"request": {
"entity": {
"id": "1",
"type": "bike",
"location": {
"latitude": 51.511061,
"longitude": -0.120022,
"timestamp": "1622802761"
}
}
},
"response": {}
}],
"read": [{
"title": "Get location by ID",
"description": "Lookup the location of an entity by ID",
"run_check": true,
"request": {
"id": "1"
},
"response": {
"entity": {
"id": "1",
"type": "bike",
"location": {
"latitude": 51.511061,
"longitude": -0.120022,
"timestamp": "1622802761"
}
}
}
}],
"search": [{
"title": "Search for locations",
"description": "Search a given radius for entities",
"run_check": true,
"request": {
"center": {
"latitude": 51.511061,
"longitude": -0.120022
},
"numEntities": 10,
"radius": 100,
"type": "bike"
},
"response": {
"entities": [{
"id": "1",
"type": "bike",
"location": {
"latitude": 51.511061,
"longitude": -0.120022,
"timestamp": "1622802761"
}
}]
}
}]
}