We have prepared the following test API endpoints for users to try out SpatialWork data visualisation tools. These endpoints provide randomly generated values for different attributes of different objects and they are refreshed at fixed intervals. The objects can be dynamic or static. Dynamic objects have x, y, z and angle values that determine the position of the object in SpatialWork. Static objects have attributes that are changing as well, though at a less frequent interval as compared to dynamic objects. For example, an air conditioner is a static object in SpatialWork that has the attributes power_consumption and operation_time, both of which will be increasing at fixed intervals.
Each device has a topic associated with it. A topic is how the devices are organised based on their location and whether they are dynamic or static objects. For example, a static object located in Car Manufacturing Plant is under the topic: data/User2/CarManufactoryPlant/ and a dynamic object located in Car Manufacturing Plant is under the topic: data/User2/CarManufactoryPlant/dynamic. Dynamic object topics should always end with “/dynamic”. Currently, there are 3 main topics corresponding to different locations:
data/User1/warehouse (location: Warehouse)
data/User2/CarManufactoryPlant (location: Car Manufacturing Plant)
4. Function: Get latest records of all devices under a specific topic in CSV format
Connection type: REST
HTTP request method: GET
URL (static object):
URL (dynamic object):
Response type: CSV
Example:
URL:
Object type: Static
Topic: data/User2/CarManufactoryPlant/es
Device name: -
Location: Car Manufacturing Plant
Response:
"id","device_name","topic","category","manufacturer","model","measurement_range","value","datetime"
34,"ES001","data/User2/CarManufactoryPlant/es","Temperature and Humidity","OMEGA Engineering, Inc.","HH314A","0 to 100%
RH, -20 to 60°C",0.08,"2023-08-04T15:03:02.000Z"
35,"ES002","data/User2/CarManufactoryPlant/es","Air Quality","OMEGA Engineering, Inc.","Aeroqual Series 500","0 to
100",48,"2023-08-04T15:03:02.000Z"
5. Function: Get records of a single device within a period of time in JSON format
8. Function: Get records of all devices under a topic within a period of time in CSV format
Connection type: REST
HTTP request method: GET
URL (static object):
URL (dynamic object):
Response type: CSV
Example:
URL:
Object type: Static
Topic: data/User2/CarManufactoryPlant/es
Device name: -
Location: Car Manufacturing Plant
Response:
"id","device_name","topic","category","manufacturer","model","measurement_range","records"
34,"ES001","data/User2/CarManufactoryPlant/es","Temperature and Humidity","OMEGA Engineering, Inc.","HH314A","0 to 100%
RH, -20 to
60°C","[{""value"":0.31,""datetime"":""2023-08-01T17:20:05.000Z""},{""value"":0.3,""datetime"":""2023-08-01T17:20:15.000Z""}]"
35,"ES002","data/User2/CarManufactoryPlant/es","Air Quality","OMEGA Engineering, Inc.","Aeroqual Series 500","0 to
100","[{""value"":52.424,""datetime"":""2023-08-01T17:20:05.000Z""},{""value"":51.424,""datetime"":""2023-08-01T17:20:15.000Z""}]"