Writing Data to the PI System Using PI Web API: What's Possible?
Discover how the PI Web API enables you to write data directly into the PI System, the supported operations, and where traditional interfaces still shine.
Roshan Soni
Can You Write Data to PI System via PI Web API? A Quick Guide
OSIsoft's PI System is renowned for collecting, storing, and exposing operational data. Traditionally, data ingress to PI has relied on interfaces or connectors. However, questions commonly arise: Can you write data directly into the PI System using a RESTful API instead? Specifically, is the PI Web API read-only, or does it offer write capabilities?
Let's clarify this based on the current state of PI Web API.
Writing Data with PI Web API: What's Supported
Since PI Web API 2015, write operations have been supported in addition to the existing data retrieval (GET) methods.
For PI Point Data
- Endpoint:
POST streams/{webID}/value - Purpose: Write (update) a single current value to a PI Point.
- Example: Send a POST request with the desired timestamp and value payload to update a tag.
- Documentation: See the Streams controller - UpdateValue section in the PI Web API help.
For AF Attributes (Static/Configuration Data)
- Endpoint:
PUT attributes/{webID}/value - Purpose: Update the value of a static or configuration AF attribute (not time-series data).
- Use case: Changing a setpoint or configuration parameter associated with an AF Element.
- Documentation: See the Attributes controller - UpdateValue in the API docs.
Limitations
- Bulk Writes: At present, bulk write support (writing multiple values in a single request) is not available. Each write action must be performed individually.
Should You Use PI Web API for Ingress Instead of Interfaces?
- Interfaces/Connectors remain the best practice for large-scale, high-frequency data collection from process equipment or standard protocols. They are optimized for robust, reliable, high-volume streaming.
- PI Web API is ideal for ad hoc data injections, integration with applications or custom solutions, and IoT scenarios where data arrives from disparate REST-capable sources.
Conclusion
The PI Web API empowers developers and integrators to both read from and write to the PI System. Whether you're updating live sensor data from a custom device or modifying a digital setpoint, PI Web API puts these capabilities at your fingertips—no interface required.
Always consult the latest PI Web API documentation for up-to-date method details and best practices for security and data integrity.
Tags
About Roshan Soni
Expert in PI System implementation, industrial automation, and data management. Passionate about helping organizations maximize the value of their process data through innovative solutions and best practices.
No comments yet
Be the first to share your thoughts on this article.
Related Articles
Enhancing PI ProcessBook Trends with Banding and Zones: User Needs, Workarounds, and the Road Ahead
A look at the user demand for trend banding/zoning in OSIsoft PI ProcessBook, current VBA workarounds, UI challenges, and how future PI Vision releases aim to address these visualization needs.
Roshan Soni
Migrating PIAdvCalcFilVal Uptime Calculations from PI DataLink to PI OLEDB
Learn how to translate PI DataLink's PIAdvCalcFilVal advanced calculations—like counting uptime based on conditions—into efficient PI OLEDB SQL queries. Explore three practical approaches using PIAVG, PIINTERP, and PICOunt tables, and get tips for validation and accuracy.
Roshan Soni
Understanding PI Web API WebID Encoding: Can You Generate WebIDs Client-Side?
Curious about how PI Web API generates WebIDs and whether you can encode them client-side using GUIDs or paths? This article explores the encoding mechanisms, current documentation, and best practices for handling WebIDs in your applications.
Roshan Soni