Skip to the content

Wincc Rest Api -

WinCC REST API: Architecture, Implementation, and Practical Application for Modern Industrial Automation Abstract As industrial environments transition toward Industry 4.0 and IIoT, traditional Human-Machine Interface (HMI) systems like Siemens WinCC must expose data via modern, platform-agnostic interfaces. This paper explores the WinCC REST API – its architecture, setup, authentication methods, endpoint structure, and practical use cases. We provide implementation examples in Python and JavaScript, discuss performance considerations, and compare the REST API with OPC UA and native WinCC interfaces. Finally, we examine security implications and future developments.

1. Introduction WinCC (Windows Control Center) by Siemens is a leading SCADA and HMI system used in manufacturing, energy, and infrastructure. Historically, data access relied on OPC (Classic/UA), proprietary DLLs (e.g., CCApi ), or database queries. However, modern web-based dashboards, mobile applications, and enterprise IT systems require stateless, HTTP-based communication. The WinCC REST API (available in WinCC Professional V7.5 SP2 and later, as well as WinCC OA) provides a RESTful interface to read/write process tags, acknowledge alarms, and retrieve archive data. This paper documents its capabilities and practical integration.

2. Architecture Overview The WinCC REST API is implemented as an additional service running on the WinCC station. It communicates with the WinCC Runtime Database via internal COM interfaces. [External Client] --(HTTP/HTTPS)--> [WinCC REST Service] --(Internal COM)--> [WinCC Runtime] | +--> [Tag Archive] +--> [Alarm Log]

Key components:

REST Service Host : Usually a .NET-based Windows service ( WinCCRESTService.exe ). Endpoint Listener : Port 50051 (default) or configurable. Authentication Module : Supports Windows Authentication (NTLM/Kerberos) or API keys (WinCC OA). Data Mapper : Converts WinCC data types (e.g., WORD , FLOAT , TEXT ) to JSON.

3. Enabling and Configuring the WinCC REST API 3.1 Prerequisites

WinCC Professional V7.5 SP2 or higher / WinCC OA 3.17+ Windows Server 2016/2019 or Windows 10 Enterprise LTSC .NET Framework 4.7.2 or .NET Core 3.1 wincc rest api

3.2 Activation Steps

Install WinCC REST Service via Siemens Setup (add/remove features). Configure HTTPS certificate (mandatory for production). Use Windows Certificate Store. Set allowed origins (CORS) for web clients. Define user permissions : WinCC Runtime users must have REST access rights in User Administrator. Start service and verify via http://<wincc-host>:50051/status .

Example configuration file ( WinCCREST.config ): <RestApi> <Port>50051</Port> <EnableHttps>true</EnableHttps> <CertificateThumbprint>AB123...</CertificateThumbprint> <CorsOrigins> <Origin>https://dashboard.company.com</Origin> </CorsOrigins> <MaxTagReadBatch>100</MaxTagReadBatch> </RestApi> : { &#34

4. API Endpoints Reference Base URL: https://<wincc-ip>:50051/api/v1 | Method | Endpoint | Description | |--------|------------------------------|-------------------------------------------| | GET | /tags | List all tags (paginated) | | GET | /tags/<name> | Read single tag value | | POST | /tags/read | Batch read multiple tags | | POST | /tags/write | Write one or more tags | | GET | /alarms/active | Get current active alarms | | GET | /alarms/history | Query alarm log (with filters) | | POST | /alarms/acknowledge | Acknowledge an alarm by ID | | GET | /archives/<tag>/values | Historical values over time range | | GET | /status | WinCC runtime status (running/stopped) | 4.1 Example Request/Response Request (Write tag TankLevel to 75.5): POST /api/v1/tags/write Host: wincc-server:50051 Content-Type: application/json Authorization: Negotiate ... { "TankLevel": 75.5 }

Response : { "success": true, "timestamp": "2025-03-15T14:32:10Z", "results": { "TankLevel": { "value": 75.5, "quality": "good" } } }