Wincc Rest Api 2021 • Complete & Premium
The WinCC REST API is a modern interface introduced to simplify data exchange between Siemens WinCC SCADA systems and external IT applications like Python, web apps, or MES/ERP systems. Core Features
Read/Write Access: External clients can read and write WinCC configuration data and tag values.
Standard Protocols: Uses standard HTTP methods (GET, POST, etc.) and returns data in JSON format.
Browser Support: Includes support for CORS (Cross-Origin Resource Sharing), making it usable directly in web scripts. Key Components The REST functionality is split into two primary roles:
WinCC/REST-API (Server): Allows other systems to query WinCC for tag management data, RT (Runtime) values, and archive tags.
WinCC/REST Connector (Client): Enables WinCC to actively send REST requests to external systems, triggered by tag changes or alarms. Technical Details
Licensing: Requires at least the WinCC/Connectivity Pack license; otherwise, it returns a "402 Payment Required" error.
Security: Managed via the WinCC Certificate Manager; users must configure SSL certificates for the connection. Default Port: Typically uses port 34568.
Versions: Available in WinCC V8.0 and updated versions of WinCC V7.5 (e.g., Service Pack 2 Update 17+).
💡 Pro Tip: Use the command netsh http show sslcert in Windows to verify your SSL certificate binding for the REST API port. If you'd like to start developing with the API: REST interface in WinCC (RT Professional)
The SIMATIC WinCC V8.0 REST API is a modern interface that enables external applications to access configuration and runtime data from the SCADA system using standard HTTP methods and JSON. Core Capabilities
Data Access: Allows external IT systems, mobile apps, and MES/ERP platforms to read configuration data from tag management.
Read/Write Operations: Supports reading and writing runtime values, including real-time tags and archive tags.
CORS Support: The API includes Cross-Origin Resource Sharing (CORS) support, enabling its use directly in browser-based scripts.
Industrial IoT Integration: Often used to build pipelines for AI agents (e.g., predictive maintenance or anomaly detection) by moving data from WinCC to Python or SQL environments. Components & Tools
WinCC/Rest Connect: A newer desktop-based option for simple IT integration.
WinCC/REST Connector: A specialized tool to actively send REST requests from WinCC to other systems, triggered by alarms or specific tag values. wincc rest api
JSON Configurator: A built-in utility that helps users create and structure requests containing runtime values. Technical Setup
Default Port: The REST service typically operates on port 34568 by default.
Security: Configuration is managed via the Certificate Manager, where administrators must create and install the necessary certificates for secure communication. Methods: It utilizes standard HTTP methods: GET: To retrieve data. POST: To create data or trigger actions. PUT: To update existing data. Integration Workflow
To implement a reporting or data pipeline using this API, developers typically follow these steps:
Configure Connectivity: Set up secure certificates and define endpoints in the WinCC Certificate Manager.
Design the Pipeline: Map WinCC tags to an external environment (e.g., WinCC → Python → SQL).
Execute Requests: Use an AI agent or middleware to query the REST service for specific values.
Process Data: Use libraries like Pandas or NumPy for analysis or generating visual reports in tools like Power BI.
Example: Writing a Tag Value (HTTP POST)
To change a value, you would switch to a POST request with a JSON payload.
# Payload to write value '50.5' to the tag payload = "name": "Setpoint_Temperature", "value": 50.5write_url = f"wincc_host/WinCCUnified/WriteTagValue"
response = requests.post( write_url, auth=(username, password), json=payload, verify=False )
if response.status_code == 200: print("Value written successfully.")
Pagination, filtering, and querying
- APIs commonly support page/limit or cursor tokens for large result sets.
- Use server-side filtering to reduce bandwidth (time ranges, tag lists, alarm severity).
- For history, use aggregation/resampling on server side when requesting long ranges.
Final Recommendations:
- Always use HTTPS with valid certificates in production.
- Implement a reverse proxy (nginx, IIS) to manage caching, rate limiting, and access logs.
- Start with a small pilot—monitor a single machine via a simple Python script before scaling.
- Read the Siemens official documentation for your exact WinCC version, as endpoint syntax evolves.
The REST API transforms WinCC from a visualization tool into a data server. Embrace it, and watch your operational data flow freely across the enterprise.
Last updated: March 2025. Always refer to the official Siemens WinCC documentation for version-specific parameters and updates.
Here is some content related to WinCC REST API: The WinCC REST API is a modern interface
Introduction
Siemens WinCC is a popular Human-Machine Interface (HMI) software used in industrial automation. The WinCC REST API (Representational State of Resource) allows developers to access and manipulate WinCC data and functions using standard HTTP requests. This enables integration with other systems, applications, and services, promoting a more connected and flexible industrial automation landscape.
Key Features of WinCC REST API
- Data Access: Read and write process values, tags, and archives
- Alarm and Event Management: Retrieve and acknowledge alarms, as well as retrieve event logs
- User Management: Create, modify, and delete user accounts
- Security: Support for authentication and authorization using username/password, certificates, and role-based access control
- Platform Independence: Accessible from any platform, including Windows, Linux, and mobile devices
Use Cases for WinCC REST API
- Integration with MES and ERP Systems: Connect WinCC with Manufacturing Execution Systems (MES) and Enterprise Resource Planning (ERP) systems to provide a seamless exchange of data and improve production planning and optimization.
- Custom Web and Mobile Applications: Develop custom web and mobile applications to provide remote access to WinCC data and functions, enabling operators and managers to monitor and control production processes from anywhere.
- Third-Party Software Integration: Integrate WinCC with third-party software, such as analytics tools, to leverage advanced data analysis and machine learning capabilities.
REST API Endpoints
The WinCC REST API provides a range of endpoints to access and manipulate data and functions. Some examples include:
- /api/v1/tags: Retrieve a list of all tags in the system
- /api/v1/alarm: Retrieve a list of current alarms
- /api/v1/events: Retrieve a list of events
- /api/v1/users: Create, modify, or delete user accounts
Authentication and Authorization
The WinCC REST API supports multiple authentication methods, including:
- Basic Authentication: Using a username and password
- Certificate Authentication: Using digital certificates
- OAuth: Using tokens obtained through an authorization server
Code Examples
Here are some simple code examples to get you started:
Python example using requests library
import requests
# Set API endpoint and authentication
endpoint = "https://wincc-server/api/v1/tags"
username = "operator"
password = "password"
# Send GET request
response = requests.get(endpoint, auth=(username, password))
# Print response
print(response.json())
JavaScript example using axios library
const axios = require('axios');
// Set API endpoint and authentication
const endpoint = "https://wincc-server/api/v1/tags";
const username = "operator";
const password = "password";
// Send GET request
axios.get(endpoint, auth: username, password )
.then(response =>
console.log(response.data);
)
.catch(error =>
console.error(error);
);
The WinCC REST API is a self-hosted service available in SIMATIC WinCC (V7.5 SP2 or higher) and WinCC Unified that enables external applications to securely interact with SCADA Runtime and configuration data using standard HTTP methods and JSON. Core Capabilities
The API serves as a bridge between the industrial OT layer and IT applications, allowing for:
Data Access: Read and write both Runtime values (tags) and configuration data.
System Integration: Connect external tools like C# applications or reporting platforms (e.g., Power BI) to WinCC. Example: Writing a Tag Value (HTTP POST) To
Cloud Connectivity: Send data to cloud platforms via the WinCC/Cloud Connector using the REST protocol. Bi-directional Communication:
REST Service (Inbound): External apps call WinCC to request or update data.
REST Connector (Outbound): WinCC actively sends data to external REST interfaces, such as weather services. Standard Methods Supported The interface follows standard RESTful principles: GET: Retrieve tag values or project configuration.
POST: Send multiple values or specific resources in the request body.
PUT: Update individual values, often used for cloud synchronization. Setup and Security REST Reporting API - WinCC OA
WinCC REST API: Streamlining Industrial Data Integration The Siemens WinCC REST API serves as a modern bridge between traditional industrial automation and the digital enterprise. By leveraging standard web technologies, it allows developers to interact with WinCC Unified or WinCC V7/V8 systems using HTTP requests. This shift from proprietary drivers to open standards enables seamless data flow between the factory floor and IT applications like MES, ERP, or custom web dashboards. What is the WinCC REST API?
The REST (Representational State Transfer) interface is a software architecture that uses web protocols to exchange data. In the context of WinCC, the API provides a secure way to read and write process values, manage alarms, and access historical data. Unlike traditional OLE-DB or OPC UA connections, REST is platform-independent and can be consumed by almost any modern programming language, including Python, JavaScript, and C#. Key Capabilities and Features
Universal Access: Connect to WinCC from web browsers, mobile apps, or cloud platforms.Data Read/Write: Fetch real-time tag values or update setpoints remotely.Alarm Management: Retrieve active alarm lists and acknowledge messages via API calls.Historical Data: Access logged process data for external analytics and reporting.Security: Utilizes standard authentication methods like OAuth2 or API keys to ensure data integrity. Why Use REST API in Industrial Automation?
Modern manufacturing requires agility. The WinCC REST API eliminates the need for complex middleware when building custom interfaces. For instance, a data scientist can use a Python script to pull live production metrics directly into a Jupyter notebook for real-time analysis. Similarly, IT teams can integrate shop floor data into corporate portals without needing deep expertise in PLC programming or SCADA configuration. Implementation and Getting Started
To begin using the WinCC REST API, the "Web Runtime" or "Connectivity Pack" usually needs to be enabled and configured within the WinCC project. Once the endpoint is active, developers can use tools like Postman to test requests. A typical GET request to retrieve a tag value involves calling a specific URL endpoint and receiving a JSON payload in return. This JSON format is lightweight and easy to parse, making it ideal for high-performance applications. Future-Proofing Your SCADA System
As Industry 4.0 continues to evolve, the ability to communicate via REST becomes a competitive advantage. It aligns SCADA systems with the broader Internet of Things (IoT) ecosystem. By adopting the WinCC REST API, companies ensure their industrial data is no longer trapped in a silo, but is instead a versatile asset ready for the next wave of digital transformation.
Sample Endpoint for WinCC OA
To retrieve a "dp" (datapoint) value:
GET http://wincc-oa-server:80/dp_values?dp=MySystem.AI1&dp=MySystem.AI2
The response:
[
"dp": "MySystem.AI1", "value": 76.3, "timestamp": "2025-03-09T13:45:21Z",
"dp": "MySystem.AI2", "value": 45.0, "timestamp": "2025-03-09T13:45:21Z"
]
3. Architecture Overview
The diagram below illustrates a typical deployment scenario:
External Client (Python, C#, JavaScript, Power BI, etc.)
│
│ HTTPS (JSON)
▼
┌───────────────────────┐
│ WinCC REST API │
│ (Web server built │
│ into WinCC Runtime) │
└───────────┬───────────┘
│ Internal process communication
▼
┌───────────────────────┐
│ WinCC Runtime │
│ (Tag Manager, Alarms,│
│ Archive, Security) │
└───────────┬───────────┘
│ Industrial protocol (S7, Profinet, etc.)
▼
┌───────────────────────┐
│ PLC / Field Devices │
└───────────────────────┘
Key components:
- RESTful endpoints – Exposed via HTTP(S) on configurable port (e.g., 5001).
- Authentication – Uses WinCC user credentials (basic auth or token-based).
- Stateless communication – Each request contains all necessary information.
5. Core Endpoints and Functionality
The API provides access to the three main pillars of SCADA data: