I have a tag name.
I do not know the web ID.
How can I use the Web API to get the web ID?Thank you for your help.
The easiest way is to use a search with the tag name; change the red below:
More sophisticated search examples can be found from below:
Search Queries (PI Web API Indexed Search)
Thanks Jinmo Yi. Is there any alternative for this. because I am getting the following error during the query.
This error should be fixed in order to use search functionality or PI Vision. It may be a good for you to contact our Tech Support team about this issue.
But, another way to test is to simply drill down your PI data Server.
Start from this URL:<https://<YourPIWebAPIServer>/piwebapi/dataservers>
And click points and find for your tagname. You should be able to see its webID there.
Based on the error reported :
Step 1 : Open PI Web API url : https://piwebapiserver/piwebapi/admin/search/database.html
Step 2 : Check PI server and AF servers indexed. It not available or indexed, would suggest you to add if you have permissions.
To add PI server, click Add database , type PI:PIserverName
To add AF server, Click Add database, type AF:\\AFSERVERNAME\AFDatabasename
Before you use search query , make sure it should be indexed.
Note : You can also use PI Vision admin page to add PI server and AF server but if you using PI Web API directly then would suggest above (Recommended)
It should show below status for both AF and PI.
Retrieving data ...