Wincc Rest Api !full! Jun 2026

Before making any data requests, client applications must authenticate against the WinCC User Archive or Windows User Management system. This process typically yields a Bearer Token (JSON Web Token) that must be included in the HTTP header of all subsequent API calls. Authorization: Bearer Use code with caution. Core API Operations and Examples 1. Reading Live Process Tags

import requests import json from requests.auth import HTTPBasicAuth # 1. Define configuration variables WINCC_SERVER_IP = "192.168.1.50" PORT = "443" # Standard HTTPS port used by WinCC Web Server TAG_NAME = "Station1_Temperature" # Construct the API endpoint URL (Note: Exact endpoint structure depends on your WinCC version) url = f"https://WINCC_SERVER_IP:PORT/api/v1/tags/TAG_NAME" # Setup authentication and disable strict SSL warnings for self-signed certificates auth = HTTPBasicAuth('api_user', 'SecretPassword123') requests.packages.urllib3.disable_warnings() try: # 2. Execute the HTTP GET request response = requests.get(url, auth=auth, verify=False) # 3. Process the response if response.status_code == 200: data = response.json() # Parse the JSON payload assuming standard WinCC JSON schema tag_value = data.get("Value") tag_quality = data.get("Quality") print(f"Successfully connected to WinCC!") print(f"Tag: TAG_NAME") print(f"Current Value: tag_value°C") print(f"Data Quality Code: tag_quality") else: print(f"Failed to fetch data. HTTP Status Code: response.status_code") print(f"Response: response.text") except requests.exceptions.RequestException as e: print(f"An error occurred while connecting to the WinCC Server: e") Use code with caution. Writing Data (An Overview)

Configuring the REST API within WinCC is straightforward. Here is the general workflow based on Siemens Support Guidelines :

: Used to read resource information including runtime values and configuration data from the WinCC project.

Depending on your project needs, WinCC offers two distinct REST-related functionalities: wincc rest api

: Establish a secure connection using HTTP/JSON, often prioritized with encryption or VPNs.

With the rise of Industry 4.0 and IIoT (Industrial Internet of Things), the ability to expose process data via standard web protocols is no longer a luxury—it’s a necessity. REST APIs transform WinCC from a monolithic HMI into a data server ready to talk to anything from a React dashboard to an ERP system.

The REST API does not replace WinCC’s internal OPC UA server. It acts as a higher-level, developer-friendly wrapper, often simplifying authentication and data formatting.

Once running, you can test via a web browser or tool like or cURL : Before making any data requests, client applications must

Defines specific user permissions, such as allowing an API user to "read only" while denying "write" privileges. 6. WinCC OA: GraphQL and Advanced API Solutions

The REST API is typically used for:

Read or write arrays of hundreds of tags in a single HTTP request to optimize network bandwidth. 2. Alarm and Event Logging

Node-RED's visual programming environment offers excellent integration with WinCC REST services. By using HTTP request nodes, you can create flows that read from and write to WinCC tags, then route the data to databases, dashboards, or other systems. The wincc-unified-nodes package provides custom nodes for accessing the GraphQL server in WinCC Unified environments, enabling rich visualizations and real-time data processing. Core API Operations and Examples 1

headers = "Authorization": f"Bearer token" tag_url = "https://wincc-server:8081/api/dp/TankLevel" data = requests.get(tag_url, headers=headers, verify=False) print(f"Tank Level: data.json()['value'] data.json()['unit']")

Accessing historical trends typically requires complex SQL queries or proprietary connectivity tools. The REST API simplifies this by allowing external systems to request time-series data over specific intervals using simple query parameters. This data can feed directly into business intelligence (BI) tools like Power BI or Tableau. 3. Alarm and Event Management

The industrial landscape has changed. The push for Industry 4.0 and the Industrial Internet of Things (IIoT) demands that operational technology (OT) data be accessible to information technology (IT) applications—ERP systems, MES, cloud platforms, and custom dashboards—using standard, lightweight web protocols.

wincc rest api
Nick Hance
Posted on:
I am committed to creating the best experiences possible between WordPress and Microsoft products. Connect with me to follow this adventure.
Post author