This is the Q&A space to ask any questions related to the "Programming in PI Web API" online course.
You are welcome to post your questions, as well as provide tips and suggestions to other participants!
Hello, Patrick! I am following the video classes and trying to repeat some of the steps shown. We a have Coresight test server where PI Web API is installed. I tried to replicate the GetByPath step in my environment, but I got the error msg
"Not found: '\\\\RBSQ02\\sage\\RTN_BSB'. Cannot connect to server 'RBSQ02'. Please examine connectivity to the remote PI AF Server as well as ensuring the impersonated client user can be delegated to the server."
Another detail: I am trying to access the url from a different domain from AF, PI-Server, PI Web API.
I am not familiar with the Kerberos authentication...
I have not installed the PI Web API service and we have several AF-Servers installed in our company. How can I identify the AF server where I can find the security attributes etc?
Sorry for the
I am glad you are getting troubles, this means you are working and trying to learn new things!
The error you get can be due to either your server cannot be seen from the PI Web API instance you are using or you don't have rights (due to the second authentication made against the PI AF Server, first is done over PI Web API).
I'd suggest you start with a simple call in your browser to see how you are connected : e.g. https://server/piwebapi/system/userinfo
A call to the /system/configuration endpoint can also tell you what is the current authentication configuration.
How does PI Web API Works?
PI Web API is a Windows service that can connect to any PI Data Archive or any AF Server.
Depending on your installation, the PI Web API Service can be installed on its own server or can also be sharing the same box as PI AF or PI Data Archive.
PI Web API has 3 authentication methods ( this is configured in the "Configuration" AF Database).
See the user guide for more info.
I may suggest you start with the Virtual Learning Environment provided with this online course to go through the exercises, you can work with Technical Support later to look at your PI Web API installation and configure it properly to work with Kerberos
Thanks a lot, Patrice. I am setting the VLE Access to practice. Later I will check the details and issues regarding the Kerberos...
today i tried with the POST requests. Everything went fine, until i checked in the audit trail. i'm not able to find an entry when i create a value.
my value was created, but there was no entry in the audit trail. after i created an different value with the same timestamp, i got the entry with the Audit Action "Edit".
Is it possible also to force an audit trail entry, when writing an value?
Are you talking about auditing the PI Data Archive or the AF Server?
If the former, only deletions and edits are tracked otherwise your system would get bombarded with new audit entries. There is no way to "force" an audit entry.
you're right. unfortunately it's not yet possible to configure audit trail depending on the datasource. in scope of requirements for pharmaceutical industry, all manual entries (also first time entries) for critical values should be audited. in my case i think a workarround should help (like first writing something like a digital stat and then editing the this value to the entry of the user).
i have problems to follow the CORS configuration part. My development system runs on another computer than the webapi service.
normaly Visual Studio uses IE in our case. Even with cors settings i get the following response:
i copied Chrome Portable and used it for debuging and i got the following error:
i think it's related to the ERR_INSECURE_RESPONSE
My configuration of WEB-API also has an parameter CorsExposedHeaders. I could not find this in the training video. do i have to change something there? or is there another problem?
What type of certificate do you have installed on your Web API machine?
My first thought is that maybe the certificate may not be trusted by the client and is causing your request to fail.
In this case, you will want to set up IE to trust the certificate by following these instructions.
If you have a trusted certificate, let me know and we can probe further!
i also found out it was related to the certificate. after adding the certificate to the trusted certificates on the development server the error message changed. the further investigations i documented in another PI Square topic (outisde this training space) as i ran out of time to continue the training:
hope i'm able to finish until tomorrow as it's hard to do the training on a different environment (e.g. i have no internet-access and had to download the java-library and do the reference in a different way)
I am an assistant for Patrice Thivierge and Paul Martin. Where are you at with the final project? Please do not hesitate to ask questions to help yourself.
In this situation, I think I can be lenient with the deadline. You asked a question and the response time was slow (which I apologize for) and on top of that, you've had some technical issues. I won't get around to grading the final projects until Monday so as long as the submission is to me by end of day Monday we should be fine . If you need more time, email me and let's work something out.
Retrieving data ...