Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi everyone,
there is a GET call to retrieve all data collected from a property of a Thing, in json format?
It's also possible specify a timestamp and retrieve all the data since that period
Thanks,
Daniele
Solved! Go to Solution.
Hello Aditya,
thanks, anywayI found the solution and I post here for those who will read the post:
The solution is make a POST like this:
https://<ServerName>Thingworx/Things/myThing/Services/QueryNumberPropertyHistory?propertyName=Speed
Dont' forget the securty key and content type.
Daniele
Hi Daniele,
You can try using the service "QueryPropertyHistory", to get the values of all the logged params/properties of your thing. This service takes start date and end date as its input parameters.
If you want to get the values of a particular property which is of number type you can use "QueryNumberPropertyHistory". This service takes the property name of a thing as input as well as start and end date. There are similar services for other types of properties as well like -
"QueryBooleanPropertyHistory",
"QueryDateTimePropertyHistory",
"QueryImagePropertyHistory"..etc.
You can find these services in the Services -> Generic Services section for a Thing.
I hope this helps. Please let me know in case if any other details are needed.
Thanks
Aditya Mittal
Hi Aditya,
thanks for your response.
So assuming that I have:
- a thing call "myThing"
- a property call "Speed" (Number)
how will be the Rest get call?
I'm thinking something like this:
https://<ServerName>/Thingworx/Things/myThing/Property/Speed/QueryPropertyHistory/
Thanks,
Daniele
Hello Daniele,
Regarding the Rest API call, I am not so sure about it. Probably you might have to wait untill someone else replies on your query.
-Aditya
Hello Aditya,
thanks, anywayI found the solution and I post here for those who will read the post:
The solution is make a POST like this:
https://<ServerName>Thingworx/Things/myThing/Services/QueryNumberPropertyHistory?propertyName=Speed
Dont' forget the securty key and content type.
Daniele