Hello.
Can anybody provide an example of a curl request for this
queryDeviceAttributeEvents
queryDeviceAttributeEvents([criteria : object]) -> events : array
Get logged values of device attributes
Parameters
• criteria (object, optional)
○ deviceId (string|array, optional)
○ attributeName (string|array, optional)
○ after (date, optional)
○ before (date, optional)
○ order (string, optional)
○ orderDirection (string, optional)
○ offset (number, optional)
○ limit (number, optional)
Result
• events (array)
HTTP-Request
GET /api/database/device-attributes/
The example for execution works. I guess that I am not able to construct a valid json string with objects.
curl \
-X PATCH \
--header "Content-Type:application/json" \
--data '{"type": "value", "valueOrExpression": 1337}' \
--user "user:password" \
http://your-pimatic/api/variables/the-answer
Please see the following topic for future posts containing code or command snippets. Thanks!
https://forum.pimatic.org/topic/1179/how-to-post-code-snippets-and-alike-on-the-forum