Case Studies
Real PI Web API integration projects. See the challenge, the technical approach, and the measurable results.
Manufacturing Data Pipeline Modernization
Global Manufacturing Company
Challenge
Legacy PI SDK scripts running on a single server were breaking nightly, causing gaps in production reporting. The team had no visibility into failures and spent 6-8 hours each week manually re-running extracts and verifying data completeness. The scripts used direct AF SDK calls, tying them to a specific Windows server, and had no retry logic -- any network hiccup caused a full failure requiring manual restart.
Solution
PiSharp rebuilt the data pipeline using PI Web API and Python, with proper retry logic, chunked historical backfill, and structured logging. The pipeline runs on a modern container platform with health checks and alerting.
Technical details
- --Replaced AF SDK calls with PI Web API batch reads -- 200+ points per batch with automatic chunking
- --Implemented watermark-based incremental extraction to eliminate redundant data pulls
- --Added exponential backoff retry (3 retries, 2/4/8s delays) for transient PI Web API failures
- --Built truncation detection to catch silent data loss from maxCount limits
- --Containerized with Docker for deployment on any platform, not just the original Windows server
- --Added structured JSON logging with rotation for production observability
Results
- Zero undetected data gaps since deployment (6+ months)
- Pipeline runtime reduced from 4 hours to 35 minutes (8.6x improvement)
- Self-healing retries eliminated 100% of manual intervention
- Full observability through structured logs and Grafana dashboards
- Can now run on Linux containers, removing Windows server dependency
Services used
Tech stack
PI Integration Security and Performance Audit
Energy Sector Organization
Challenge
An internal team had built a PI Web API integration over two years. With a new compliance requirement (IEC 62443), they needed an external review of security posture, credential handling, and data access patterns before moving to production. The integration was functional but had grown organically -- no one had reviewed it holistically for security and performance.
Solution
PiSharp conducted a full integration audit covering authentication, certificate handling, session management, error handling, batch usage, and deployment configuration. The audit produced a prioritized findings report with specific code fixes and remediation steps.
Technical details
- --Identified Basic auth being used in production -- migrated to Kerberos with constrained delegation
- --Found SSL certificate validation disabled (verify=False) -- configured proper CA bundle trust chain
- --Discovered unbounded batch requests (500+ sub-requests) causing 503 errors under load -- implemented chunking at 100
- --Session objects being created per-request, causing socket exhaustion -- implemented connection pooling with HTTPAdapter
- --Credentials stored in plaintext config files -- migrated to environment variables and Windows Credential Manager
- --No retry logic for transient failures -- added exponential backoff for 502/503/504 responses
Results
- 12 security findings identified and remediated
- Authentication upgraded from Basic to Kerberos
- Batch request chunking reduced memory usage by 60%
- Connection pooling reduced TCP connection overhead by 85%
- Passed internal security review on first submission
- Achieved IEC 62443 compliance for the PI integration component
Services used
Tech stack
Water Utility PI Web API Quickstart
Regional Water Utility
Challenge
A water utility was expanding their PI System to include 800+ new sensor points from a new treatment plant. Their existing data access was through PI ProcessBook displays only -- no programmatic access. They needed to feed PI data into their new cloud-based analytics platform but had no PI Web API development experience on the team.
Solution
PiSharp delivered a quickstart package with authenticated PI Web API access, point discovery for the new treatment plant, recorded and interpolated value reads, and a scheduled data export to their cloud platform. The package included a handoff session to train their team.
Technical details
- --Configured Kerberos authentication with constrained delegation across their DMZ boundary
- --Built point discovery using AF element traversal -- automatically finding all points under the new plant's AF hierarchy
- --Implemented multi-point batch reads with pandas DataFrame output for their analytics team
- --Built scheduled export using Python with cron, pushing hourly summaries to their Azure SQL database
- --Added health check endpoint that monitors PI Web API connectivity and data freshness
Results
- Team went from zero PI Web API knowledge to self-sufficient in 2 weeks
- 800+ points accessible programmatically for the first time
- Hourly data export to cloud analytics running reliably
- Team independently added 3 new data feeds in the month after handoff
Services used
Tech stack
Start your project
Every integration is different. Tell us about your PI Web API challenge and we will scope the right engagement -- or point you to the free Developer Hub resources if that is the better fit.
Your story here
We are always looking for projects to feature. If you have worked with PiSharp and want to share your results, let us know.