7 Replies Latest reply on Sep 2, 2015 3:04 PM by gregor

    PI web api

    ArunaNamadev

      Am trying to use the below link in Postman to get the list of asset server

      http://<MyServerIPAddress>/piwebapi/assetservers  and Header values are Content-Type: application/json and doing a get operation but i am getting the following error

       

       

      Response.jpg

       

      Help me in resolving this.

        • Re: PI web api
          Eugene Lee

          Hi Aruna,

           

          PI Web API uses https. So could you try adding the 's' behind 'http' to see if it works?

            • Re: PI web api
              ArunaNamadev

              Get this error message when i append s after http

               

              Response.jpg

                • Re: PI web api
                  Eugene Lee

                  Hi Aruna,

                   

                  Instead of using the IP Address, could you try using the FQDN or hostname instead? Have you imported the certificate for the PI Web API server? You could also try that same url in a browser such as Chrome.

                    • Re: PI web api
                      ArunaNamadev

                      yes certificate is imported for this server


                      { "Message": "Authorization has been denied for this request." } getting this error when i typed directly in the URL.


                        • Re: PI web api
                          gregor

                          Hello Aruna,

                           

                          You are experiencing an authentication issue. Are you operating in a domain environment or asked differently is there a domain controller available that can be used for Kerberos Delegation?

                          Can you please draft your environment by describing your PI System infrastructure i.e. where PI Data Archive and PI Asset Framework Server are located relative to your PI Web API host? Are you browsing PI Web API on the PI Web API host or on a remote client?

                          Please lookup the PI Web API configuration in your PI AF Database named "Configuration". Please look for Element "OSIsoft" -> "PI Web API" -> "<Hostname>" -> "System Configuration". What's the value(s) of string array AuthenticationMethods?

                            • Re: PI web api
                              ArunaNamadev

                              Hi Gregor Beck,

                               

                              The value is Basic and value(s) is also Basic with 0 as array index. PI system is located at the remote client ..

                                • Re: PI web api
                                  gregor

                                  Hello Aruna,

                                  Your PI Web API is configured for Basic authentication and the PI System is located remote. I am sorry but we will need to collect more information. Some information like machine names, IP addresses, user names and passwords are sensitive information. You are encouraged to cheat here because we are more interested e.g. if PI Web API is configured for a FQDN, a host name or IP address rather than receiving the exact information what the FQDN, hostname or IP address is.

                                   

                                  Is the PI System remote to the PI Web API host?
                                  Are you executing PI Web API queries locally or from another client remote to PI Web API?

                                   

                                  Can you please go to "Programs and Features", locate PI Web API, select it and click [Change] to verify how PI Web API is installed? Please be careful since we don't (yet) want to apply any changes but just verify some details of your setup. The following assumes you have the latest PI Web API version 2015 R2 installed. With other versions the experience might be a little different because the order might be different and some screens might not show, other screens might show additionally.

                                  • The first screen showing is the welcome screen.
                                  • Click [Next] and select [Change] on the second screen.
                                  • Click [Next] a few times until the Select a Configuration Instance dialog pops up. Click [Connect] and afterwards [Ok].
                                  • The next screen should show which port PI Web API is configured to listen. The response you get indicates the port isn't the issue. Click [Next]
                                  • The Certificate appears to be ok as well. Click [Next]
                                  • Click [Next] on the next screen to confirm your settings for a Windows Firewall Exception to be created or not.
                                  • The next screen is about the Web API Service Account. Is the default service account chosen or a custom account? If it is a custom account, is it a local user or a domain account? Click [Next]
                                  • We are not yet interested in the Crawler Service Account. Therefore please click [Next] on the corresponding screen.
                                  • The next screen should identify the selected PI Web API URL. Does it show with an IP address, a hostname or with FQDN? Click [Next]
                                  • You should now see a screen that says Ready to change PI Web API 2015 R2. Please click [Cancel], confirm and [Finish]
                                  1 of 1 people found this helpful