REST API for MES Test Automation
MaConSim provides a REST API that exposes all frontend functionality for programmatic access. Use it to integrate machine simulation into test automation frameworks, CI/CD pipelines, or custom integrations with MES, SCADA and other IoT systems.
Availability: The REST API is available in the Docker deployment only — it is not part of the Windows, macOS or Linux desktop versions. See Docker deployment.
Back to the product overview.

How the REST API works
- Base URL:
http://localhost:8080(Docker deployment; port configurable indocker-compose.yml) - Request format: every endpoint is an HTTP POST with a JSON body
- Response format: JSON with the result data, or a JSON error message with an HTTP error code
- Coverage: every interaction available in the MaConSim frontend is also available through the API
- CORS: configured to allow requests from any origin, so local tools and dashboards can call it directly
# List all plants
curl -X POST http://localhost:8080/api/get_plants \
-H "Content-Type: application/json" \
-d '{}'
# Export plant 1 as a portable YAML file
curl -X POST http://localhost:8080/api/export_plant_yaml \
-H "Content-Type: application/json" \
-d '{"plant_id": 1}' \
--output plant-export.yaml
Interactive documentation
- Swagger UI at
http://localhost:8080/swagger-ui— complete endpoint list with parameter documentation, request/response examples and try-it-out. - OpenAPI specification at
/api-docs/openapi.json— machine-readable, for API client code generation and automated testing frameworks.
Typical use cases
- Automated testing of MES functionality that requires a machine simulation environment.
- CI/CD pipeline integration — run MES/SCADA tests automatically before updates.
- Custom integrations with external systems and batch operations.
- Setting up reproducible demo or test plants via script.
Technical details
| Aspect | Detail |
|---|---|
| Availability | Docker deployment only (backend service, port 8080) |
| Authentication | None — designed for local access only; do not expose to the internet |
| Transport | HTTP POST + JSON body in, JSON out |
| Documentation | Swagger UI /swagger-ui, OpenAPI /api-docs/openapi.json |
| CORS | Any origin allowed |
| MCP | The same API is exposed to AI agents as MCP tools — see MCP Server |
FAQ
Is the REST API available in the desktop app? No — only when running MaConSim via Docker. The desktop versions do not expose the REST API.
Does the API require authentication? No. It is designed for local clients only and is not intended to be exposed to the internet. In Docker, keep the port mapping local.
Can I generate a client from the API?
Yes — download the OpenAPI specification from /api-docs/openapi.json and use
it with any OpenAPI code generator.
Technical documentation
Read the REST API chapter of the User Manual: Accessing the API and Usage Notes, plus the Docker deployment.
Related: MCP Server for AI agents · Automation Flows · Machine Simulation.
