
PI Web API
PI Web API is the RESTful interface to PI System data. Use it to read, write, and query PI points, attributes, and elements from any language or platform over standard HTTPS.
Who this is for
Developers
Building integrations, dashboards, or data pipelines that need PI System data. Python, .NET, JavaScript, or any HTTP client.
Data engineers
Building ETL pipelines to move PI historian data into data warehouses, lakes, or analytics platforms.
Teams migrating from AF SDK
Moving from .NET AF SDK to the REST API for cloud, Linux, or cross-platform support.
What makes our guides different
- Production patterns, not toy examples. Every code sample includes error handling, selectedFields, quality flags, and digital state handling.
- The gotchas that matter. Compression exceptions, silent truncation, Kerberos double-hop, batch partial failures -- the issues that only surface in real deployments.
- Multi-language coverage. Python-first, with .NET and JavaScript examples for key operations.
- Tested against real PI Systems. Not generated from the API specification -- written from hands-on integration experience.
Recommended learning path
- 1
Start Here
Understand what PI Web API is, verify your connection, and make your first request with proper error handling.
- 2
Authentication
Set up Basic, Kerberos, NTLM, or Bearer auth. Handle SSL certificates and debug auth failures.
- 3
WebID & Lookup
Find PI points and attributes by name or path. Understand WebID encoding and AF hierarchy traversal.
- 4
Reading Values
Current, recorded, interpolated, and summary reads. Quality flags, digital states, and selectedFields.
- 5
Writing Values
Write single values, bulk values, and updates. updateOption, bufferOption, and backfill safety.
- 6
Batch Requests
Combine multiple reads and writes into a single HTTP request. Chunking, error handling, and RequestTemplate.
- 7
Pagination & Limits
Handle large datasets with time-based pagination, continuation tokens, and truncation detection.
- 8
Python Guide
Session management, async patterns, pandas integration, and production ETL with watermark tracking.
- 9
Cookbook & Examples
12 production-ready recipes plus working examples in Python, JavaScript, and C#.
- 10
Python SDK
Simplify your code with the open-source PiSharp Python SDK. 60-95% less boilerplate.
Guides
Start Here
TutorialYour first PI Web API request with connection verification and common first-time fixes.
Authentication
How-toAll auth methods, certificate handling, Kerberos delegation, and session management.
WebID & Lookup
How-toFind PI resources by path, search, or name filter. WebID encoding and AF traversal.
Reading Values
How-toCurrent, recorded, interpolated, and summary reads with quality and performance patterns.
Writing Values
How-toSingle, bulk, and batch writes with updateOption, bufferOption, and backfill safety.
Batch Requests
How-toMulti-request batching with chunking, error handling, and RequestTemplate patterns.
Pagination & Limits
How-toHandle large result sets, server limits, and silent truncation.
Python Guide
TutorialSessions, async, pandas, connection pooling, and ETL patterns.
Recipes, examples, and SDK
Cookbook
12 recipes12 production-ready Python recipes for common PI Web API tasks.
Example Gallery
ExamplesWorking code in Python, JavaScript, and C# for every common operation.
Advanced Recipes
AdvancedCircuit breakers, parallel reads, change detection, backfill, and data quality.
Python SDK
SDKpip install pisharp-piwebapi -- auth, reads, writes, batch, and pandas in one library.
SDK vs Raw Requests
ComparisonSide-by-side code comparison with line count reduction table.
Postman Collection
DownloadPre-built API requests ready to import into Postman.
Reference and troubleshooting
Troubleshooting
ReferenceHTTP error reference, SSL debugging, auth diagnostics, and comprehensive diagnostic scripts.
Advanced Troubleshooting
ReferenceKerberos delegation, IIS tracing, COMExceptions, memory pressure, and log analysis.
.NET & PI Web API
.NETHttpClient, IHttpClientFactory, System.Text.Json, and typed models for .NET teams.
PI Web API vs AF SDK
ComparisonDetailed comparison with benchmarks, migration guide, and hybrid patterns.
PI Web API vs PIconnect
ComparisonArchitecture comparison, performance, deployment, and honest when-to-use-each guidance.