How to use PI Web API to search AF Tree?

How to use PI Web API to search AF Tree?

 

We are required to use PI Web API to search the AF Tree, like searching by a template name.

May I know is there any sample to do so?

Thanks

Parents
  • It sounds like you are new to the PI Web API, so I am going to point you to some resources to help you in addition to answering your question.

     

    You can download the user guide and the programmer's reference guide from here. The user's guide mostly contains information on how to install and configure the PI Web API program rather than use the RESTful API itself. The Programmers Reference guide discusses how to use the RESTful API, but it is written for programmers who are familiar with RESTful APIs, so it is a bit difficult to understand if you are not a programmer.

     

    One other thing, the Programmer's Reference Guide is a collection of html pages instead of a Word document or PDF. The section of the Programmer's Reference guide most pertinent to your question can be found in [directory where you unzipped the Programmer's Reference Guide]/help/topics/pi-web-api-indexed-search_-getting-started.html.

     

    Based on the information in the Programmer's Reference Guide I have constructed an example query for you, https://[web server name]/piwebapi/search/query?q=afelementtemplate:*[template name]* . You should replace the red text with the name of your web server or template name as appropriate for your system. The query will return all of the templates of all of your known AF Servers that match the expression *[template name]*.

Reply
  • It sounds like you are new to the PI Web API, so I am going to point you to some resources to help you in addition to answering your question.

     

    You can download the user guide and the programmer's reference guide from here. The user's guide mostly contains information on how to install and configure the PI Web API program rather than use the RESTful API itself. The Programmers Reference guide discusses how to use the RESTful API, but it is written for programmers who are familiar with RESTful APIs, so it is a bit difficult to understand if you are not a programmer.

     

    One other thing, the Programmer's Reference Guide is a collection of html pages instead of a Word document or PDF. The section of the Programmer's Reference guide most pertinent to your question can be found in [directory where you unzipped the Programmer's Reference Guide]/help/topics/pi-web-api-indexed-search_-getting-started.html.

     

    Based on the information in the Programmer's Reference Guide I have constructed an example query for you, https://[web server name]/piwebapi/search/query?q=afelementtemplate:*[template name]* . You should replace the red text with the name of your web server or template name as appropriate for your system. The query will return all of the templates of all of your known AF Servers that match the expression *[template name]*.

Children