T-IA Connect API Reference — 316 Endpoints
Complete REST API documentation for Siemens TIA Portal automation. All endpoints include executable examples in curl, PowerShell and Python.
Health & Status
Monitor the API and TIA Portal connection state. These endpoints are designed for heartbeat checks and system monitoring.
- GET /api/health — Quick health check to verify the API is running and TIA Portal is reachable.
- GET /api/health/diagnostics — Full diagnostics report including TIA Portal connectivity, machine info, and Openness permissions.
- GET /api/health/versions — List all installed TIA Portal versions detected on the machine.
- GET /api/health/ping — Simple ping endpoint to check if the API server is responding.
- GET /api/instance/status — Check the current connection status and which TIA Portal project is open.
- GET /api/instance/version — Get the current TIA-Connect API version.
TIA Portal Management
Control the TIA Portal instance lifecycle. Attach to running processes, launch new instances, or shut down connections.
- GET /api/instances — List all running TIA Portal instances detected on the machine.
- GET /api/instance/status — Get the current connection status and which TIA Portal project is open.
- GET /api/instance/version — Get the current TIA-Connect API version.
- GET /api/instance/diagnostics — Get detailed TIA process diagnostics including memory usage, CPU, and Openness status.
- POST /api/instance/actions/attach — Attach to an existing TIA Portal process by its PID. Use GET /api/instances to find running processes first.
- POST /api/instance/actions/launch — Launch a new TIA Portal instance. The API will start TIA Portal and automatically connect to it.
- POST /api/instance/actions/detach — Detach from the current TIA Portal instance without closing it. TIA Portal continues running independently.
- POST /api/instance/actions/shutdown — Shutdown the TIA Portal connection and close the TIA Portal process gracefully.
- POST /api/tia/firewall/whitelist — Add the current application to the TIA Portal Openness firewall whitelist. Required for first-time setup.
Project Operations
Open, save, create, and close TIA Portal projects. You can also archive projects to .zap files or restore them.
- GET /api/projects — List all currently open projects in TIA Portal.
- GET /api/projects/overview — Get a full overview of the current project including devices, blocks, and tags.
- POST /api/projects/actions/create-sync — Create a new empty TIA Portal project. This is a synchronous call that waits until the project is ready.
- POST /api/projects/actions/open — Open an existing TIA Portal project. This is an asynchronous operation — use the returned jobId to poll for completion.
- POST /api/projects/actions/close-sync — Close the currently open project. This is a synchronous call that waits until the project is fully closed.
- POST /api/projects/actions/save-sync — Save the currently open project. This is a synchronous call that waits until the save is complete.
- POST /api/projects/actions/archive — Archive the current project to a .zap file. This is an asynchronous operation — use the returned jobId to poll for completion.
- POST /api/projects/actions/create-from-archive-sync — Restore a project from a .zap archive file. This is a synchronous call that waits until the project is fully restored.
- GET /api/projects/history — Get the list of recently opened projects.
- GET /api/projects/infrastructure — Get project infrastructure details (subnets, connections, IO systems).
- POST /api/projects/actions/save — Save the currently open project (asynchronous).
- POST /api/projects/actions/close — Close the currently open project (asynchronous).
- DELETE /api/projects/history — Remove an entry from the project history.
- POST /api/projects/actions/create — Create a new empty TIA Portal project (asynchronous).
- POST /api/projects/actions/create-from-archive — Restore a project from a .zap archive file (asynchronous).
- POST /api/projects/actions/simulation-support — Enable simulation support for the project (PLCSIM Advanced).
- POST /api/projects/actions/index — Index or reindex the project for faster searches and navigation.
Devices
Manage PLCs, HMIs, and other hardware components. Add devices from the catalog, configure network settings, and compile hardware configurations.
- GET /api/projects/devices — List all devices in the current project.
- POST /api/projects/devices/actions/add-sync — Add a new device to the project by order number.
- DELETE /api/devices/{deviceName} — Delete a device from the project.
- POST /api/devices/actions/rename — Rename an existing device.
- POST /api/devices/{deviceName}/actions/compile-sync — Compile device hardware configuration (synchronous).
- POST /api/devices/{deviceName}/actions/compile — Compile device hardware configuration (asynchronous).
- POST /api/devices/{deviceName}/actions/configure-network-sync — Configure the IP address and subnet mask of a device.
- POST /api/catalog/actions/find-sync — Find a device in the hardware catalog by exact order number.
- POST /api/catalog/actions/search-sync — Fuzzy search the hardware catalog by keyword or partial order number.
- POST /api/devices/{deviceName}/actions/export-hardware-async — Export device hardware configuration as AML (asynchronous).
- POST /api/projects/devices/actions/import-hardware-sync — Import a hardware configuration from an AML file.
- GET /api/devices/compatible-slots — Get compatible module slots for a device.
- GET /api/projects/devices/async — List all devices in the current project (asynchronous).
- GET /api/devices/{deviceName}/hardware-details — Get hardware details with network information for a device.
- GET /api/projects/devices/parking-lot — Get parking lot devices (unplaced devices in the project).
- POST /api/projects/devices/parking-lot/actions/clear — Clear all devices from the parking lot.
- POST /api/projects/devices/actions/add — Add a new device to the project by order number (asynchronous).
- POST /api/catalog/actions/find — Find a device in the hardware catalog by exact order number (asynchronous).
- POST /api/catalog/actions/search — Fuzzy search the hardware catalog by keyword or partial order number (asynchronous).
- GET /api/catalog/cache/status — Get the current status of the hardware catalog cache.
- POST /api/catalog/cache/load — Load the hardware catalog cache into memory.
- POST /api/catalog/cache/build — Build (or rebuild) the hardware catalog cache.
- POST /api/devices/{deviceName}/actions/configure-network — Configure the IP address and subnet mask of a device (asynchronous).
- POST /api/devices/{deviceName}/actions/export-hardware — Export device hardware configuration as AML (synchronous).
- POST /api/projects/devices/actions/import-hardware — Import a hardware configuration from an AML file (asynchronous).
- POST /api/devices/actions/rename-async — Rename an existing device (asynchronous).
- POST /api/devices/{deviceName}/actions/delete-async — Delete a device from the project (asynchronous).
- GET /api/catalog/images/{orderNumber} — Get the catalog image for a device by its order number.
Blocks
Manage program blocks (OB, FB, FC, DB). Create blocks with LAD, FBD, or SCL logic, export/import them, and modify their interfaces. This is the core of code generation.
- GET /api/devices/{deviceName}/blocks — List all blocks in the device program.
- GET /api/devices/{deviceName}/blocks/tree — Get the block tree structure including folders.
- GET /api/devices/{deviceName}/blocks/{blockName}/content — Get the full content of a block including its interface and network code.
- POST /api/devices/{deviceName}/blocks — Create a new block (OB, FB, FC, or DB) with optional interface and network code.
- DELETE /api/devices/{deviceName}/blocks/{blockName} — Delete a block from the device program.
- POST /api/devices/{deviceName}/blocks/actions/rename — Rename an existing block.
- POST /api/devices/{deviceName}/blocks/actions/export-sync — Export a block to an XML file.
- POST /api/devices/{deviceName}/blocks/actions/import-sync — Import a block from an XML file.
- POST /api/devices/{deviceName}/blocks/{blockName}/networks — Add one or more networks to an existing block.
- POST /api/devices/{deviceName}/blocks/{blockName}/interface/members — Add a new member to the block interface (Input, Output, InOut, Static, Temp, etc.).
- POST /api/devices/{deviceName}/blocks/folders — Create a new folder in the program blocks tree.
- POST /api/devices/{deviceName}/external-sources/import-and-generate — Import raw SCL source text and compile it into TIA Portal blocks.
- PUT /api/devices/{deviceName}/blocks/{blockName}/content — Update the content of an existing block (interface and network code).
- GET /api/devices/{deviceName}/blocks/{blockName}/export-xml — Export a block as SimaticML XML and return the XML content directly.
- POST /api/devices/{deviceName}/blocks/{blockName}/actions/export-source — Export a block as SCL source code to a file path.
- POST /api/devices/{deviceName}/blocks/{blockName}/actions/create-snapshot — Create a snapshot of the current block state for later restoration.
- POST /api/devices/{deviceName}/blocks/{blockName}/actions/load-snapshot — Load and restore a previously created block snapshot.
- POST /api/devices/{deviceName}/blocks/{blockName}/actions/load-start-values — Load start values to actual values for a data block.
- POST /api/devices/{deviceName}/blocks/{blockName}/actions/export-prodiag — Export ProDIAG diagnostic data from a block to a file.
- GET /api/devices/{deviceName}/blocks/async — List all blocks in the device program (async variant for large projects).
- POST /api/devices/{deviceName}/blocks/actions/export — Export a block to an XML file (async variant).
- POST /api/devices/{deviceName}/blocks/actions/import — Import a block from an XML file (async variant).
- POST /api/devices/{deviceName}/blocks/actions/rename-async — Rename an existing block (async variant).
- DELETE /api/devices/{deviceName}/blocks/folders — Delete a folder from the program blocks tree.
- PUT /api/devices/{deviceName}/blocks/{blockName}/interface/members/{memberName} — Update an existing interface member (change data type, comment, etc.).
- DELETE /api/devices/{deviceName}/blocks/{blockName}/interface/members/{memberName} — Delete an interface member from a block.
- GET /api/devices/{deviceName}/external-sources — List all external sources in the device.
- POST /api/devices/{deviceName}/external-sources/from-file — Create an external source from an existing SCL file on disk.
- POST /api/devices/{deviceName}/external-sources/from-text — Create an external source from raw SCL text content.
- DELETE /api/devices/{deviceName}/external-sources/{sourceName} — Delete an external source from the device.
- POST /api/devices/{deviceName}/external-sources/{sourceName}/generate — Generate (compile) blocks from an external source into the TIA Portal project.
- POST /api/devices/{deviceName}/external-sources/folders — Create a folder in the external sources tree.
- DELETE /api/devices/{deviceName}/external-sources/folders — Delete a folder from the external sources tree.
Tags & Constants
Manage PLC variables (Tags) and user constants. Bulk import tags from CSV, Excel, or JSON. Create tag tables and organize them in folders.
- GET /api/devices/{deviceName}/tags/all — Get all tags across all tables.
- POST /api/devices/{deviceName}/tags — Add a single tag.
- PUT /api/devices/{deviceName}/tag-tables/{tableName}/tags/{tagName} — Update a tag.
- DELETE /api/devices/{deviceName}/tag-tables/{tableName}/tags/{tagName} — Delete a tag.
- POST /api/devices/{deviceName}/tags/actions/import-sync — Import tags from JSON.
- POST /api/devices/{deviceName}/tag-tables/{tableName}/actions/import-csv-sync — Import tags from a CSV file.
- POST /api/devices/{deviceName}/tag-tables/{tableName}/actions/import-xlsx-sync — Import tags from an Excel file.
- GET /api/devices/{deviceName}/tag-tables — List tag tables.
- POST /api/devices/{deviceName}/tag-tables/actions/create-sync — Create a tag table.
- DELETE /api/devices/{deviceName}/tag-tables/{tableName}/actions/delete-sync — Delete a tag table.
- GET /api/devices/{deviceName}/tag-tables/{tableName}/constants — List constants in a tag table.
- POST /api/devices/{deviceName}/tag-tables/{tableName}/constants — Create a constant in a tag table.
- GET /api/devices/{deviceName}/tag-tables/{tableName}/tags — Get all tags from a specific tag table.
- GET /api/devices/{deviceName}/tag-tables/{tableName}/tags/async — Get all tags from a specific tag table asynchronously.
- POST /api/devices/{deviceName}/tag-tables/{tableName}/actions/export-excel-sync — Export tags from a table to an Excel file.
- POST /api/devices/{deviceName}/tag-tables/{tableName}/actions/export-csv-sync — Export tags from a table to a CSV file.
- POST /api/devices/{deviceName}/tag-tables/{tableName}/actions/export-excel — Export tags from a table to an Excel file asynchronously.
- POST /api/devices/{deviceName}/tag-tables/{tableName}/actions/export-csv — Export tags from a table to a CSV file asynchronously.
- POST /api/devices/{deviceName}/tags/actions/import — Import tags from JSON asynchronously.
- POST /api/devices/{deviceName}/tag-tables/{tableName}/actions/import-csv — Import tags from a CSV file asynchronously.
- POST /api/devices/{deviceName}/tag-tables/{tableName}/actions/import-xlsx — Import tags from an Excel file asynchronously.
- GET /api/devices/{deviceName}/tag-tables/{tableName}/export-xml — Export tags from a table as XML.
- GET /api/devices/{deviceName}/tag-tables/tree — Get the tag table tree view including folders.
- GET /api/devices/{deviceName}/tag-tables/async — List tag tables asynchronously.
- POST /api/devices/{deviceName}/tag-tables/actions/create — Create a tag table asynchronously.
- PUT /api/devices/{deviceName}/tag-tables/{tableName}/actions/update-sync — Rename a tag table.
- PUT /api/devices/{deviceName}/tag-tables/{tableName}/actions/update — Update a tag table asynchronously.
- DELETE /api/devices/{deviceName}/tag-tables/{tableName}/actions/delete — Delete a tag table asynchronously.
- GET /api/devices/{deviceName}/tag-tables/{tableName}/constants/system — Get system constants only from a tag table.
- GET /api/devices/{deviceName}/tag-tables/{tableName}/constants/user — Get user constants only from a tag table.
- PUT /api/devices/{deviceName}/tag-tables/{tableName}/constants/{constantName} — Update a constant in a tag table.
- DELETE /api/devices/{deviceName}/tag-tables/{tableName}/constants/{constantName} — Delete a constant from a tag table.
- POST /api/devices/{deviceName}/tag-tables/folders — Create a tag table folder.
- DELETE /api/devices/{deviceName}/tag-tables/folders — Delete a tag table folder.
Data Types (UDT)
Manage User Defined Types (PLC Data Types). Create complex data structures, organize them in folders.
- GET /api/devices/{deviceName}/udts — List all User Defined Types in the device.
- POST /api/devices/{deviceName}/udts — Create a new User Defined Type with the specified members.
- GET /api/devices/{deviceName}/udts/{udtName} — Get the full details of a specific UDT including all its members.
- PUT /api/devices/{deviceName}/udts/{udtName} — Update an existing UDT by replacing its member definitions.
- DELETE /api/devices/{deviceName}/udts/{udtName} — Delete a User Defined Type from the device.
- GET /api/devices/{deviceName}/udts/tree — Get the UDT folder tree structure including nested folders.
- POST /api/devices/{deviceName}/udts/actions/export — Export a UDT to an XML file on disk.
- POST /api/devices/{deviceName}/udts/async — Create a new User Defined Type asynchronously.
- PUT /api/devices/{deviceName}/udts/{udtName}/async — Update an existing UDT asynchronously.
- POST /api/devices/{deviceName}/udts/{udtName}/actions/export — Export a specific UDT to a file on disk.
- POST /api/devices/{deviceName}/udts/actions/import — Import a UDT from a file.
- POST /api/devices/{deviceName}/udts/actions/import/async — Import a UDT from a file asynchronously.
- POST /api/devices/{deviceName}/udts/folders — Create a UDT folder.
- DELETE /api/devices/{deviceName}/udts/folders/{folderPath} — Delete a UDT folder.
HMI Screens
Manage HMI screens, tags, scripts, and graphic resources. Browse screen hierarchies and export configurations.
- GET /api/devices/{deviceName}/hmi/screens/tree — Get the full screen tree hierarchy for an HMI device.
- GET /api/devices/{deviceName}/hmi/screens/{screenName}/details — Get detailed information about a specific HMI screen.
- GET /api/hmi/unified/summary — Get a unified summary of all HMI configurations across devices.
- GET /api/devices/{deviceName}/hmi/tags/tree — Get the legacy HMI tags tree structure organized by tag tables (WinCC Comfort/Advanced).
- GET /api/hmi/tags/tree — Get a cross-device HMI tags tree (all devices combined).
- GET /api/devices/{deviceName}/hmi/scripts/tree — Get the HMI scripts tree structure.
- GET /api/devices/{deviceName}/hmi/scripts/{scriptName}/content — Get the source code content of a specific HMI script.
- GET /api/devices/{deviceName}/hmi/text-lists — List all HMI text lists.
- GET /api/devices/{deviceName}/hmi/text-lists/{listName}/xml — Export a specific HMI text list as XML.
- GET /api/devices/{deviceName}/hmi/graphic-lists — List all HMI graphic lists.
- GET /api/devices/{deviceName}/hmi/project-graphics — List all HMI project graphics.
- GET /api/devices/{deviceName}/hmi/library-types/{typeName} — Get details of a specific HMI library type.
- GET /api/devices/{deviceName}/hmi/unified/tags/tree — Get the unified HMI tags tree for a specific device.
- GET /api/hmi/library-types/detailed — Get all HMI library types with full details across all devices.
Download / Upload
Transfer programs between TIA Portal and physical PLCs. Go online/offline and monitor CPU state.
- POST /api/devices/{deviceName}/online — Go online with the specified device to establish a live connection.
- DELETE /api/devices/{deviceName}/online — Go offline and disconnect from the device.
- GET /api/devices/{deviceName}/online/status — Check whether the device is currently online or offline.
- GET /api/devices/{deviceName}/cpu/status — Get the current CPU operating state (RUN, STOP, etc.).
- POST /api/devices/{deviceName}/actions/download-sync — Download the program to the PLC synchronously. Waits for the operation to complete before returning.
- POST /api/devices/{deviceName}/actions/download — Download the program to the PLC asynchronously. Returns a job ID to poll for completion.
- POST /api/devices/{deviceName}/actions/upload — Upload (read back) the program from the PLC (asynchronous).
- POST /api/devices/{deviceName}/actions/upload-sync — Upload (read back) the program from the PLC (synchronous).
- POST /api/devices/{deviceName}/cpu/actions/start — Start the CPU (set to RUN mode).
- POST /api/devices/{deviceName}/cpu/actions/stop — Stop the CPU (set to STOP mode).
- POST /api/devices/{deviceName}/actions/compare — Compare online and offline versions of the device program.
PLCSim Simulation
Control PLCSim Advanced instances directly from the API. Create virtual PLCs, manage their lifecycle, read/write tags, and run simulations without physical hardware.
- GET /api/simulation/runtime/status — Get PLCSim runtime status including version and running state.
- POST /api/simulation/runtime/start — Start the PLCSim Advanced runtime environment.
- GET /api/simulation/runtime/config — Get the current PLCSim runtime configuration.
- PUT /api/simulation/runtime/config — Update the PLCSim runtime configuration.
- POST /api/simulation/runtime/port — Set the communication port used by PLCSim Advanced.
- POST /api/simulation/instances/create — Create a new virtual PLC instance in PLCSim Advanced.
- DELETE /api/simulation/instances/{name} — Delete a virtual PLC instance by name.
- POST /api/simulation/instances/{name}/power-on — Power on a virtual PLC instance.
- POST /api/simulation/instances/{name}/power-off — Power off a virtual PLC instance.
- POST /api/simulation/instances/{name}/run — Set the virtual PLC CPU to RUN mode.
- POST /api/simulation/instances/{name}/stop — Set the virtual PLC CPU to STOP mode.
- POST /api/simulation/instances/{name}/memory-reset — Reset PLC memory for the specified instance.
- GET /api/simulation/instances/{name}/state — Get the current state of a virtual PLC instance.
- GET /api/simulation/instances/{name}/config — Get configuration details for a specific instance.
- PUT /api/simulation/instances/{name}/config — Update configuration for a specific instance.
- GET /api/simulation/instances/{name}/network — Get network configuration for a specific instance.
- PUT /api/simulation/instances/{name}/network — Update network configuration for a specific instance.
- GET /api/simulation/status — Get overall simulation status including runtime and active instances.
- GET /api/simulation/instances — List all registered virtual PLC instances.
- POST /api/simulation/connect — Connect to a PLCSim Advanced instance for tag access and monitoring.
- POST /api/simulation/disconnect — Disconnect from the current PLCSim Advanced instance.
- GET /api/simulation/tags — List all available simulation tags from the connected instance.
- POST /api/simulation/tags/refresh — Refresh the tag list from the connected PLCSim instance.
- GET /api/simulation/tags/{tagName} — Read the current value of a specific simulation tag.
- PUT /api/simulation/tags/{tagName} — Write a value to a specific simulation tag.
- POST /api/simulation/tags/batch-read — Read multiple simulation tags in a single request.
- POST /api/simulation/tags/batch-write — Write values to multiple simulation tags in a single request.
- GET /api/simulation/profiles — List all saved simulation profiles.
- POST /api/simulation/profiles — Create a new simulation profile with instance definitions.
- GET /api/simulation/profiles/{fileName} — Get details of a specific simulation profile.
- POST /api/simulation/start — Start a simulation session on a specific instance.
- POST /api/simulation/stop — Stop the current simulation session.
- GET /api/simulation/state — Get the current simulation state including connection and running status.
- POST /api/simulation/import-legacy — Import a legacy PLCSim project into PLCSim Advanced.
Diagnostics
Explore the TIA Portal Openness API internals. Discover available types, namespaces, providers, and enum values. Useful for debugging and advanced integration.
- GET /api/diagnostic/namespaces — Get a summary of all Siemens Engineering namespaces and their type counts.
- GET /api/diagnostic/types?filter={filter} — Search for Openness types matching a filter string.
- GET /api/diagnostic/search?typeName={name} — Search for a specific type by name.
- GET /api/diagnostic/enum-values/{typeName} — Get all values of a specific Openness enum type.
- GET /api/diagnostic/providers — List all available Openness provider interfaces.
- GET /api/diagnostic/online-download-types — Get categorized online and download types supported by TIA Portal.
- GET /api/diagnostic/plc-services/{deviceName} — Get PLC software services available for a device.
- GET /api/diagnostic/cpu-services/{deviceName} — Get CPU services available for a device.
Watch & Force Tables
Monitor and force PLC variables in real-time. Create watch tables, manage entries, and import/export tables.
- GET /api/devices/{deviceName}/watch-tables — List all watch tables in the device.
- POST /api/devices/{deviceName}/watch-tables — Create a new empty watch table.
- DELETE /api/devices/{deviceName}/watch-tables/{tableName} — Delete a watch table from the device.
- POST /api/devices/{deviceName}/watch-tables/{tableName}/entries — Add one or more tag entries to a watch table.
- POST /api/devices/{deviceName}/watch-tables/{tableName}/actions/export — Export a watch table to an XML file on disk.
- GET /api/devices/{deviceName}/force-tables — List all force tables in the device.
- POST /api/devices/{deviceName}/watch-force-tables/actions/import — Import a watch or force table from an XML file.
- GET /api/devices/{deviceName}/watch-tables/{tableName} — Get detailed information about a specific watch table including its entries.
- POST /api/devices/{deviceName}/watch-tables/{tableName}/entries/actions/remove — Remove specific entries from a watch table.
- POST /api/devices/{deviceName}/watch-tables/{tableName}/entries/actions/clear — Clear all entries from a watch table.
- POST /api/devices/{deviceName}/force-tables — Create a new force table.
- GET /api/devices/{deviceName}/force-tables/{tableName} — Get detailed information about a specific force table.
- DELETE /api/devices/{deviceName}/force-tables/{tableName} — Delete a force table from the device.
- POST /api/devices/{deviceName}/force-tables/{tableName}/actions/export — Export a force table to an XML file on disk.
- POST /api/devices/{deviceName}/watch-force-tables/folders — Create a folder in the watch/force tables container.
- DELETE /api/devices/{deviceName}/watch-force-tables/folders — Delete a folder from the watch/force tables container.
History & Snapshots
API-driven versioning for blocks and tag tables. Create snapshots before modifications, restore them if needed. Provides a safety net for automated changes.
- GET /api/projects/history — Get the list of recently opened projects.
- GET /api/history/stats — Get snapshot storage statistics.
- GET /api/history/blocks/{deviceName}/{blockName} — List all snapshots for a specific block.
- POST /api/history/blocks/{deviceName}/{blockName}/actions/snapshot — Create a manual snapshot of a block before making changes.
- GET /api/history/snapshots/{snapshotId} — Get details of a specific snapshot.
- DELETE /api/history/snapshots/{snapshotId} — Delete a snapshot. Returns 404 if the snapshot does not exist.
- POST /api/history/actions/cleanup — Trigger a cleanup of old snapshots to free storage.
- GET /api/history/tags/{deviceName}/{tableName} — List all snapshots for a specific tag table.
- POST /api/history/tags/{deviceName}/{tableName}/actions/snapshot — Create a manual snapshot of a tag table before making changes.
- GET /api/history/snapshots/{snapshotId}/content — Get the full content of a snapshot (block source or tag table entries).
- POST /api/history/snapshots/{snapshotId}/actions/restore-sync — Restore a snapshot synchronously, replacing the current block or tag table content.
Block Generation
Generate TIA Portal blocks from JSON specifications. Create LAD, FBD, or SCL blocks without XML manipulation.
- POST /api/blockgeneration/generate-only — Generate a block XML file from a JSON specification without importing it into the project.
- POST /api/blockgeneration/generate-and-import — Generate a block from a JSON specification and immediately import it into the TIA Portal project.
- POST /api/blockgeneration/import-only — Import an existing XML block file into the TIA Portal project without generating it.
- POST /api/blockgeneration/generate-from-design — Generate a block from a high-level design specification. The API interprets the design and produces the appropriate block structure.
- POST /api/blockgeneration/generate-graph — Generate a GRAPH (sequential function chart) block and import it into the project.
- POST /api/blockgeneration/generate-graph-only — Generate a GRAPH block XML file without importing it into the project.
- GET /api/blockgeneration/templates — List all available block templates for code generation.
- POST /api/blockgeneration/bulk-import — Import multiple block XML files into the project at once.
Security & UMAC
Manage project security, protection levels, passwords, and UMAC (User Management Access Control) users and roles.
- GET /api/devices/{deviceName}/security/summary — Get security summary for a device — shows which protection mechanisms are active.
- GET /api/devices/{deviceName}/security/protection-level — Get the current CPU protection level.
- POST /api/devices/{deviceName}/security/password — Set or change a password for a specific access level.
- POST /api/security/users — Create a UMAC user in the project (User Management Access Control).
- GET /api/security/users — List all UMAC users in the project.
- GET /api/security/roles — List all UMAC roles available in the project.
- DELETE /api/devices/{deviceName}/security/password/{accessLevel} — Delete a password for a specific access level.
- POST /api/devices/{deviceName}/security/display-password — Set the display password for a device (HMI display protection).
- POST /api/devices/{deviceName}/security/master-secret/actions — Set the master secret for a device.
- POST /api/devices/{deviceName}/security/configure — Configure security settings for a device (protection levels, access control).
Async Jobs
Handle long-running operations. Many endpoints return a Job ID — poll this endpoint to get the result when ready.
- GET /api/jobs/{jobId} — Get the current status and result of an asynchronous job.
- POST /api/jobs/execute-sync — Execute a job synchronously, blocking until the operation completes and returning the result directly.
Libraries
Manage project and global libraries. Create master copies, browse library trees, and instantiate types.
- GET /api/project/library/tree — Get the full project library tree structure including folders and items.
- GET /api/project/library/master-copies — List all master copies in the project library.
- POST /api/project/library/master-copies — Create a new master copy from an existing block or item in the project.
- DELETE /api/project/library/master-copies/{name} — Delete a master copy from the project library.
- GET /api/libraries/global — List all global libraries available on the system.
- GET /api/project/library — Get project library information.
- POST /api/project/library/master-copies/actions/instantiate — Instantiate a master copy into the project (e.g., into a specific device).
- DELETE /api/project/library/master-copies/{mcPath} — Delete a master copy from the project library by its path.
- POST /api/project/library/master-copies/folders — Create a folder in the project library master copies.
- GET /api/project/library/types — List all library types in the project library.
- POST /api/project/library/types/actions/instantiate — Instantiate a library type into the project.
- DELETE /api/project/library/types/{typeName} — Delete a library type from the project library.
- POST /api/project/library/types/versions — Create a new version of a library type.
- POST /api/project/library/types/{typeName}/actions/set-default — Set the default version for a library type.
- POST /api/project/library/types/actions/compare — Compare two library types or type versions.
- POST /api/libraries/global — Create a new global library.
- POST /api/libraries/global/actions/open — Open an existing global library.
- POST /api/libraries/global/actions/close — Close the currently open global library.
- POST /api/libraries/global/actions/save — Save the currently open global library.
- POST /api/libraries/global/actions/archive — Archive the currently open global library.
- GET /api/libraries/global/tree — Get the full tree structure of the global library.
- GET /api/libraries/global/master-copies — List all master copies in the global library.
- POST /api/libraries/global/master-copies — Create a new master copy in the global library.
- DELETE /api/libraries/global/master-copies — Delete a master copy from the global library.
- POST /api/libraries/global/master-copies/actions/instantiate — Instantiate a master copy from the global library into the project.
- POST /api/libraries/global/master-copies/folders — Create a folder in the global library master copies.
- GET /api/libraries/global/types — List all types in the global library.
- POST /api/libraries/global/types/actions/instantiate — Instantiate a type from the global library into the project.
- DELETE /api/libraries/global/types/{typeName} — Delete a type from the global library.
- GET /api/devices/{deviceName}/blocks/{blockName}/cross-references — Get cross-references for a specific block (where it is used and what it uses).
MCP & AI Assistant
Model Context Protocol integration for AI assistants. Connect Claude Code, Cursor, Windsurf, or custom LLMs to TIA Portal via Server-Sent Events.
- GET /mcp/info — Get MCP server information including version and available tools.
- GET /mcp/config — Get the MCP client configuration to add to your AI tool settings (claude_desktop_config.json, etc.).
- GET /mcp/sessions — List all active MCP sessions.
- GET /mcp/sse?sessionId={sessionId} — Open an SSE (Server-Sent Events) connection for real-time MCP communication.
- POST /mcp/messages?sessionId={sessionId} — Send a JSON-RPC message to the MCP server. Used after SSE handshake to send tool calls and requests.
- GET /mcp/instance — Get MCP instance information (TIA Portal version, project state, etc.).
- GET /mcp/sessions/{sessionId} — Get details for a specific MCP session.
- POST /mcp/sessions/cleanup — Cleanup stale or disconnected MCP sessions.
AI Assistant
Chat with the context-aware AI assistant. It understands your TIA Portal project and can help with programming, debugging, and optimization.
- POST /api/assistant/chat — Send a message to the AI assistant. The response is streamed in real-time. Optionally provide a ProjectKey to give the assistant context about a specific project.
- GET /api/assistant/history — Retrieve the chat history. Optionally filter by project key using query parameter.
- DELETE /api/assistant/history — Clear the entire chat history. This action cannot be undone.
- POST /api/assistant/stop — Stop the current AI generation in progress. Useful when the assistant is producing a long response you no longer need.
- POST /api/assistant/models — Get the list of available AI models based on the current assistant configuration. Send the assistant settings to filter compatible models.
Design Spec
Generate PLC code from high-level design specifications. Describe what you want in natural language or structured specs, and the API generates the blocks.
- POST /api/design-spec/load — Load a design specification into memory. The spec describes the PLC logic you want to generate.
- POST /api/design-spec/load-separate — Load a design specification with separate sections for inputs, outputs, logic, and configuration. Useful for complex specs built incrementally.
- GET /api/design-spec/model — Get the currently loaded design model. Returns the full specification that was previously loaded.
- DELETE /api/design-spec/model — Clear the currently loaded design model from memory.
- POST /api/design-spec/generate — Generate PLC blocks from the currently loaded design specification. The blocks are generated but not imported into the TIA Portal project.
- POST /api/design-spec/generate-and-import — Generate PLC blocks from the loaded design specification and automatically import them into the currently open TIA Portal project.
System API
Configure the API server settings, browse documentation, and manage system-level operations.
- GET /api/settings — Get the current API server settings including security configuration.
- POST /api/settings — Save updated settings. Send the full settings object (use GET first to read current values).
- GET /api/docs — Get the full API documentation as a single text document (designed for LLM consumption).
- GET /api/docs/sections — List all documentation sections. This endpoint is public — no API key required.
- GET /api/docs/search?q={query} — Search the API documentation. Returns matching sections and snippets.
- GET /api/system/browse-file — Open a file browser dialog on the TIA Portal host machine.
- GET /api/system/browse-project — Open a project browser dialog to select a TIA Portal project.
- GET /api/system/browse-folder — Open a folder browser dialog to select a directory.
- GET /api/docs/sections/{sectionName} — Get a specific documentation section by name.
- GET /api/audit — Get project audit logs (API call history, actions performed).
Discovery
The API is self-documenting. Use these endpoints to programmatically discover available commands and their parameters without reading the full documentation.
- GET /api/command/list — Get a list of all available API endpoints with their controllers and HTTP methods.
- GET /api/command/info/{route} — Get detailed information about a specific API route including parameters and expected body.