Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi , I'm interessted in getting data from Thingowrx API and format it then store it in InfluxDB.
I'm using Thingworx API as follows: https://thingworxplatforme/Thingworx/Things/Machine_A/Properties
Where can i get timestamp ?
thanks
Hi Lo_ry
I'm not sure what you mean. Do you just want the current time in Thingworx and send it to Influx? If so, you can look into those 2 lines of code :
var TestVariable1 = new Date();
var TestVariable2 = (new Date()).getTime();
Then you can use those variables and send them as parameters to the service that inserts the data in Influx. You can then decide which is the best format for your needs.
Please let us know if one of those solves your issue. And if not, can you provide more details on what you're trying to accomplish.
You could also use configure ThingWorx to use Influx as persistence provider and make the properties logged, then they are already in Influx.
For this you need to make yourself familiar with Persistence Provider and Value Stream concepts. Both are documented in the help,
Try also check out the Iot_Tips section in the community.
https://community.ptc.com/t5/IoT-Tips/tkb-p/tkb_iottips
Hi @Lo_ry96,
I wanted to follow up with you on your post to see if your question has been answered.
If so, please mark the appropriate reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so that we can continue to help you.
Thanks,
Anurag