7 Replies Latest reply on Jun 30, 2015 3:24 PM by bshang

    Newbee: What is needed to get PI Web API?

    JensPr

      I am absolutely new to PI (though I have worked for several years with another process historian).

       

      We are running a PI system here in a big refinery, unfortunately I am not the admin.

       

      I am looking into writing some dynamic PHP web pages with PI data. And I came across the PI Web API and PHP class, brilliant!!

       

      So what do I need to get going?

       

      - Is there any additional license that has to be purchased? (How to get it)

      - What is the minimum PI version we have to run, to get the web API?

      - What has to be configured?

       

      (Sorry, if this is the wrong place to ask these questions, as said before, I am new to PI and this website, so I appologize..)

        • Re: Newbee: What is needed to get PI Web API?
          Rhys Kirk

          Hello and welcome from the dark side (other process historian) into the light (PI)!

           

          You can see the system requirements for PI Web API here:

          https://techsupport.osisoft.com/Products/Developer-Technologies/PI-Web-API/System-Requirements

           

          You can find the PI Web API documentation here:

          https://livelibrary.osisoft.com/LiveLibrary/web/pub.xql?c=t&action=home&pub=DeveloperTechnologies-v1&lang=en#addHistory=…

           

          Don't forget to come back and ask lots of questions!

          • Re: Newbee: What is needed to get PI Web API?
            Eugene Lee

            Regarding the license issue, the Developer Technologies are now free for download! You can download it and play around with it.

             

            PI Developer Technologies now freely available for download

             

            However, if you want to deploy the application that you build in a production environment, you will need to contact your account manager to get a runtime license that we call the 'PI System Access (PSA) License'. More details about this license can be obtained from your account manager.

            1 of 1 people found this helpful
              • Re: Newbee: What is needed to get PI Web API?
                JensPr

                Thanks a lot. These information got me going.

                 

                The only remaining thing that did became clear to me:

                Where is the PI Web API actually running on / installed on?

                 

                a) Is it on the PI Server itself, which then becomes some kind of a web server and answering client requests for data?

                 

                b) Is it on a seperate dedicated Webserver that - on client requests - talks to the PI server to retrieve the data and relay to the client.

                 

                In case b) I suspect that this will not run with an Apache server where we put our web files on. Any sever-sided tools/components must be specific to the webserver.

                Hope your answer is a) :-/

                 

                Here is what I found from the documentation... Where do these fiels/installations then have to go:

                 

                The installer is released as a self-extracting distribution kit that contains:

                • Installation files for .NET Framework 4.5.2
                • Installation files for PI AF Client 2014 R2 SP1 (x64), which includes the AF client installer, and installers for its prerequisites:
                  • OSIsoft MS Runtime Redistributables
                  • Microsoft Visual C++ Runtimes 2008, 2010, and 2012 (x86 and x64)
                  • PI SDK 2012 (x86 and x64)
                  • PI Buffer Subsystem 4.3
                • Microsoft Visual C++ Runtime 2013 (x64 only)
                • The PI Web API Windows Installer Database (MSI) file that is signed by OSIsoft.
                  • Re: Newbee: What is needed to get PI Web API?
                    dng

                    Hi Jens,

                     

                    PI Web API is a separate installation (doesn't have to installed on the PI Data Archive machine). Usually, it is installed on a web server. For more information, check out the PI Live Library documentation on PI Web API.

                    It is similar to case b scenarios that you described above. However, the PI Web API runs as its own Windows service and does not have a web server pre-requisite. If your server satisfies the system requirements (refer to documentation above), it should work.

                     

                    EDIT: The files you listed will be installed (in specific order) by the PI Web API installer on any machine that you would like to put PI Web API on.

                    1 of 1 people found this helpful
                    • Re: Newbee: What is needed to get PI Web API?
                      Lonnie Bowling

                      You can install it on the PI Sever or another windows machine, OSIsoft recommends not installing any data access components on your PI Server as a best practice, but for smaller systems where you don't want to have a lot of servers, you sometimes see things get installed on a single server. Once you have the PI Web API running, it will access the PI System (AF and the Data Archive) directly. On your web application, you can access the web api either from client side or service side scripting. If you do client side, you will need to configure CORS in the PI Web API, which is pretty simple and in the documentation.

                       

                      Lonnie

                      1 of 1 people found this helpful
                        • Re: Newbee: What is needed to get PI Web API?
                          JensPr

                          . If you do client side, you will need to configure CORS in the PI Web API, which is pretty simple and in the documentation.

                          This part I do not fully get. I read into the CORS documentation. As far as I understand it is about accessing data from another domain (which is normally forbidden for security reasons).

                          But when we install the PI Web API an a dedicated Windows 2012 server along with Apache as a webserver, then any client just talks to that server.

                          I mean the HTML pages are processed by Apache and the client-side requests for data go to the PI Web API .. on the same machine.

                           

                          Did I get it wrong?

                           

                          BTW: Many thanks to all you guys, you are brilliant and very helpful,.. got me in the right direction with no time!!