PI Web API Overview
- Last UpdatedMar 24, 2025
- 2 minute read
- PI System
- PI Web API 2023 SP1 Patch 1
- Developer
PI Web API is a RESTful PI System access layer that provides a cross-platform programmatic interface to the PI System. RESTful interfaces enable cross-platform development of web, desktop, and mobile applications across many different programming languages. PI Web API enables you to retrieve and manipulate time-series data from Data Archive, and asset and event frame data from PI AF server.
PI Web API belongs to the Developer Technologies family of products. These products are designed to support both the implementation of custom PI System applications and the integration of PI System data with other applications and business systems, such as Microsoft Office or SQL Server, Enterprise Resource Planning systems (ERPs), reporting and analytics platforms, web portals, geospatial and maintenance systems. The Developer Technologies suite covers a wide range of use cases in various environments, programming languages, operating systems and infrastructures.
Note: Starting with the PI Web API 2023 release, PI Indexed Search has been retired and is no longer a feature of PI Web API.
Bearer authentication
Claims-based authentication is supported with the OpenID Connect protocol using access tokens in the authorization header. The access token directly contains the claims as a JSON Web Token (JWT).
OpenID Connect is a protocol that is implemented by various identity providers and allows clients to obtain claims about the logged in user. Information about OpenID Connect can be found at OpenID Foundation with detailed information at OpenID Specifications and Developer Information.
The AVEVA Identity Manager (AIM) serves as the identity server for PI Web API. AIM is a standalone authentication server that exposes an OpenID Connect endpoint. When you configure Bearer authentication through the Admin Utility, PI Web API automatically registers as a client with AIM. Note that to perform this action, the user running the Admin Utility must be an AIM administration with permissions to register new clients.
For additional information on AIM, including how to install and configure it, refer to the AVEVA PI Server™ Installation and Configuration guide.
The following JavaScript sample shows how the request is made from a browser by adding the access token to the Authorization header:
var url = "https://localhost/piwebapi/assetservers";
var xhr = new XMLHttpRequest();
xhr.open("GET", url); xhr.onload = function () {
log(xhr.status, JSON.parse(xhr.responseText));
}
xhr.setRequestHeader("Authorization", "Bearer " + user.access_token);
xhr.send();
For more information on other PI Developer Technologies products and about licensing these products in your environment, contact your account manager.