Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hi everyone,
I'm using Postman to test the REST APIs for TW Analytics and I've made most of them work even though there is a lack of proper list of all APIs pertaining to Analytics.
I'm having problem with uploading the CSV to AnalyticsUploadStorage which will be used to create a dataset.
In the documentation here, they even mention an incorrect service name to do that (CreateFileText instead of CreateTextFile). I got the correct API endpoint by calling /Thingworx/Things/AnalyticsUploadStorage but I get the following error when I try to call it:
Unable to Invoke Service CreateTextFile on AnalyticsUploadStorage : null
Here is the Postman REST call:
POST https://<serverIP>/Thingworx/Things/AnalyticsUploadStorage/Services/CreateTextFile?appKey=<appKey>
form-data:
data: csv_file.csv
path: "/UptimeDowntimeData/csv_file.csv"
overwrite: true
I've also tried passing these values as application/json with data field having content of csv file as a string but to no avail.
Solved! Go to Solution.
Hi
I think this article: https://www.ptc.com/en/support/article?n=CS236873 can be useful.
The CreateTextFile will test text data as input, so you enter the content of your csv file in it.
Also the path and data should be provided in the body.
the below works for me:
Note the \n added to mark the end of line.
Hope this helps
Christophe
Hi
I think this article: https://www.ptc.com/en/support/article?n=CS236873 can be useful.
The CreateTextFile will test text data as input, so you enter the content of your csv file in it.
Also the path and data should be provided in the body.
the below works for me:
Note the \n added to mark the end of line.
Hope this helps
Christophe
Hi @cmorfin,
As I mentioned in my last line, I did try it that way. But I used actual newline instead of '\n' which I think was the problem.
Thanks.