Does anybody has a sample HTML-page for starting with WebAPI calls.
I want to read and write AF-attribute-values from this page for demonstration/learning purpose.
Yes, there are a lot of examples:
Using PI Web API with AngularJS
Using PI Web API on HTML5 with jQuery
Using PI Web API with Angular 2
Optimizing web applications using PI Web API Batch
Testing AngularJS apps with PI Web API on backend
We have also a white paper:
White Paper - Developing with PI Web API
There are some GitHub repositories as well:
GitHub - osimloeff/PI-Web-API-Client-AngularJS: PI Web API client library for AngularJS generated using the Swagger spec…
GitHub - osimloeff/PI-Web-API-White-Paper: Source code package for the Developing with PI Web API white paper
Programming-Hackathon-LRC-2017-Samples/ProgHackLRC2017Samples/WebAngular at master · osimloeff/Programming-Hackathon-LRC…
Hope it helps!
Great stuff, thank you very much.
This will keep me busy for a while
I am working on your example :Using PI Web API with AngularJS", great stuff to begin with this technology.
Now I am running against a problem: The webapi-call to the server from the Angular application does not give me the data from the server.
When I extract the call from the debugger and run it in the browser (IE) it comes with a pop-up to log-in. So I expect that is also happening with the piwebapi-call from the angular application.
How to bypass this authentication?
I am running af-version 2016R2.
We overlooked your follow up question. Please accept our apologies.
If the issue still exists for you, what security are you using with PI Web API, Kerberos or Basic? It is unlikely Anonymous because this wouldn't cause a logon to pop up.
Because Marcos has shared links to many examples, can you please indicate which one you've chosen or even better share your code? Please consider obfuscating the URL to your PI Web API instance.
You may also be interested in the video lectures shared belonging to the PI Web API online course. Please see e.g. Configuring Cross-Origin Resource Sharing (CORS) in PI Web API for an example on how to use Basic authentication with JQuery.
Thanks for asking but I have the PIWebApi running in combination with AngularJS.
Retrieving data ...