Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
I’m using the Demo version of KEPServerEX 6.14 and I would like to import a CSV into the datalogger using the API.
I followed the instructions in this github https://github.com/PTCInc/Kepware-Example-Scripts/tree/master/Datalogger/CSV%20to%20DataLogger%20API but I got a HTTP 401 error:
Settings:
Any ideas?
Thanks
Solved! Go to Solution.
Hi,
After multiple attempts, I decided to uninstall Kepserver completely and reinstall it.
I had been using version 6.5 previously and then installed version 6.14 without deleting all data, which I believe caused the issue. It is now functioning properly.
Thanks for your assistance!
A 401 error is an authentication error. Can you confirm that you are passing the correct user credentials to the API endpoint?
Best regards,
Andy Servetas
Principal Technical Support Engineer | Kepware Technologies
In the setup json file, I'm writing the user and password defined during the Kepserver installation. Is this correct?
Best regards.
While I have never tried it this way (and at this time cannot confirm either way), according to this article on REST, it should work if the credentials are being passed correctly:
I can check with our engineering team to see if this has been tested or not.
-Andy
I spoke with the engineer that wrote the script that you are using for the CSV import. He states that "The setup JSON is loaded into the script and the creds are passed into the header as normal."
Please verify that you've modified the header information in that script to pass the correct credentials as set in your User Manager to match the authentication required by the API.
-Andy
Hi,
After multiple attempts, I decided to uninstall Kepserver completely and reinstall it.
I had been using version 6.5 previously and then installed version 6.14 without deleting all data, which I believe caused the issue. It is now functioning properly.
Thanks for your assistance!