"request": [...]
and "request": {...}
Preliminary
Instructs SuperStack to respond with the objects provided. Optionally, individual parameters may be requested within objects.
Returns:
"object": {"parameters", ... }
if the object was found in the Database"not-found": ["object", ... ]
if the object was not found in the Database"bad-json": null
if an error was encountered in parsing the provided JSON data
Example:
- The SuperStack Database already contains an Object named
sensor 1
."sensor 1": { "chip":"BME280", "return": ["temperature","pressure"] }
- Request
sensor 1
andnetwork
objects"request":["sensor 1", "network"]
- The two objects will be returned in full
"sensor 1": { "chip": "BME280", "return": ["temperature","pressure"] }, "network": { "connected": true, "address": "12-23-34-AB-BA-CD" }
- If we only want specific parameters from an object. It’s possible to specify the parameters in a list:
"request": { "sensor 1":["chip"] }
- The response will therefore become”
"sensor 1": { "chip": "BME280" }