Skip to main content
PI Web API
PI Web API

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. 1

    Start Here

    Understand what PI Web API is, verify your connection, and make your first request with proper error handling.

  2. 2

    Authentication

    Set up Basic, Kerberos, NTLM, or Bearer auth. Handle SSL certificates and debug auth failures.

  3. 3

    WebID & Lookup

    Find PI points and attributes by name or path. Understand WebID encoding and AF hierarchy traversal.

  4. 4

    Reading Values

    Current, recorded, interpolated, and summary reads. Quality flags, digital states, and selectedFields.

  5. 5

    Writing Values

    Write single values, bulk values, and updates. updateOption, bufferOption, and backfill safety.

  6. 6

    Batch Requests

    Combine multiple reads and writes into a single HTTP request. Chunking, error handling, and RequestTemplate.

  7. 7

    Pagination & Limits

    Handle large datasets with time-based pagination, continuation tokens, and truncation detection.

  8. 8

    Python Guide

    Session management, async patterns, pandas integration, and production ETL with watermark tracking.

  9. 9

    Cookbook & Examples

    12 production-ready recipes plus working examples in Python, JavaScript, and C#.

  10. 10

    Python SDK

    Simplify your code with the open-source PiSharp Python SDK. 60-95% less boilerplate.

Guides

Recipes, examples, and SDK

Reference and troubleshooting