Tip how to retrieve measures filtered from SAP Cloud Platform Internet of Things for the Cloud Foundry Environment postgres database
Pre-requisite is that postgres data storage option has been configured for your SAP Cloud Platform Internet of Things for the Cloud Foundry Environment instance.
You can find a URL like the following in the api hub but its not so easy to understand the filter syntax for the timestamp with the given help:
https://weather-station.eu10.cp.iot.sap/iot/core/api/v1/devices/18/measures?&skip=0&top=10
If you now want to check the values in measures for a specific time then here are 2 tips to make it work:
- filter=timestamp ge 1513144500 (this is the time in seconds) does not work as the time will be treated as milliseconds since EPOCH
- filter=timestamp ge 1513144500000 (this is the time in milliseconds) does not work as parsing of such a large integer fails
- filter=timestamp ge ‘1513144500000’ does work!
Be the first to leave a comment
You must be Logged on to comment or reply to a post.