How to Generate a REST API for Tekla PowerFab Data: A Step-by-Step Guide
by Kevin Hood • December 12, 2025
In the steel fabrication industry, operational efficiency is defined by how well you manage data. Tekla PowerFab is the undisputed heavy lifter for estimating, production control, and inventory management. It is robust, reliable, and deeply integrated into shop floor workflows.
However, as steel fabricators look to digital transformation—building custom mobile apps for site managers or feeding data into modern analytics platforms—they hit a roadblock. Tekla functions as a data silo that's difficult to access for front end applications and data products.
Extracting data from legacy systems for use in modern frontend applications is notoriously difficult. This post explores the technical challenges of unlocking Tekla PowerFab data and details how DreamFactory solves this by instantly generating a secure, fully documented REST API from Tekla's underlying MySQL database.
The Challenge: Exposing the Data…Quickly, Safely
Tekla PowerFab typically utilizes a MySQL database to store its vast arrays of project and inventory data. While MySQL is a standard database technology, securely exposing that data to the web is complicated.
1. The Absence of a Native REST API
Modern web development relies on JSON REST APIs. Most frontend frameworks (like React or Angular) and third-party integration tools expect to communicate via standard HTTP endpoints. Tekla PowerFab does not natively provide a REST API for its database. This forces developers to work with proprietary exchange formats or XML, which creates friction and slows down development cycles.
2. The Security Risks of Direct Connections
To bypass API limitations, developers often hard-code database credentials directly into their internal applications or reporting dashboards. This is a massive security risk. It exposes your master database credentials to the frontend, meaning a savvy user (or malicious actor) could potentially access—or worse, delete—critical production data.
3. The High Cost of Custom Middleware
The traditional workaround is building "middleware"—custom code written in Python, Node.js, or Java that sits between Tekla and your app. This middleware queries the database and reformats the data. Building this requires weeks of coding, and maintaining it requires permanent developer resources.
The Solution: DreamFactory
DreamFactory is an automated API generation platform. It eliminates the need for custom middleware by sitting between your data source (Tekla's MySQL database) and your applications.
Instead of hand-coding endpoints, DreamFactory introspects the MySQL database and automatically generates a full Swagger (OpenAPI) documented REST API in minutes.
Why DreamFactory is the Ideal Connector:
Instant API Generation: It reads the MySQL schema and immediately produces endpoints (GET, POST, PUT, DELETE) for every table in Tekla PowerFab.
Granular Security: DreamFactory handles API Key management and Role-Based Access Control (RBAC). You can ensure shop floor users or mobile app users can only view "Shipping Status" but cannot edit "Inventory."
Data Transformation: You can use DreamFactory's data mesh and scripting capabilities to join tables, sanitize or reformat legacy data fields into clean JSON before they ever reach your application.
Standardization: It turns a legacy SQL database into a standard, modern interface that any web developer can understand immediately.
Frontend Autonomy: Decouples frontend from complex Tekla PowerFab data access. Developers can immediately use auto-generated APIs, eliminating custom middleware, enabling rapid application iteration, and supporting reporting/analysis.
Step-by-Step Walkthrough: From Tekla MySQL to REST API
Here is the exact workflow to turn your Tekla PowerFab database into a secure REST API using the DreamFactory Administration Console.
Prerequisites
- Network access to the server hosting the Tekla PowerFab MySQL database.
- Database credentials (Host, Port, Database Name, Username, Password).
- A running instance of the DreamFactory platform.
Step 1: Generate the Database API
- Log in to the DreamFactory Admin Console.
- In the main left-hand Menu, click API Generation & Connections.
- Click the Create button.
- API Type: In the dropdown, select Database, then choose MySQL.
- Info:
- Name: Enter a system name (e.g., tekla_db). This will be part of your API URL (e.g., /api/v2/tekla_db).
- Label: Enter a friendly display name (e.g., "Tekla PowerFab Data").
- Ensure the Active checkbox is checked.
- Config:
- Host: Enter the IP address or hostname of your Tekla server.
- Port: Enter the port number (Default is 3306).
- Database: Enter the name of your Tekla PowerFab database.
- Username/Password: Enter the credentials. (Best Practice: Use a specific "service account" user in MySQL with read-only privileges rather than root.)
- Click Save. The API is now generated and live.
Step 2: Configure Role-Based Access Control (RBAC)
Secure your data by defining exactly what users can see.
- In the main left-hand Menu, click Role Based Access.
- Click Create.
- Basic:
- Name: Enter a role name, such as Shop_Floor_Read_Only.
- Description: (Optional) Add a description.
- Ensure the Active checkbox is checked.
- Access:
- Click the plus (+) button to add a new access rule.
- Service: Select the tekla_db API you created in Step 1.
- Component: Enter * to allow access to all tables, or specify a single table name (e.g., ProductionControl) to restrict access.
- Access: Check only the GET box (to ensure read-only access). Leave POST, PUT, PATCH, and DELETE unchecked.
- Requester: Select API.
Click Save.
Step 3: Generate the API Key
You must create an API Key to authorize your external software.
- In the main left-hand Menu, click API Keys.
- Click Create.
- Name: Enter a name for your key (e.g., "Production Dashboard").
- Description: (Optional) Add details about the specific app usage.
- Role: Select the Shop_Floor_Read_Only role you created in Step 2.
- Ensure Active is checked.
- Click Save.
The API Key string will now be visible. Copy this key; you will use it in your application headers (as X-DreamFactory-Api-Key) to authenticate your calls.
Step 4: Test via Swagger Documentation
- In the main left-hand Menu, click API Docs.
- Select tekla_db from the list of APIs.
- Scroll to a table endpoint, such as GET /_table/{table_name}.
- Click Try it out.
- Enter a table name (e.g., Jobs) and click Execute.
DreamFactory will return your Tekla data as standard, clean JSON.
Frequently Asked Questions (FAQ)
1. How does DreamFactory handle the load on the Tekla server?
DreamFactory includes server-side caching options. In the Config section of your API settings, you can enable caching (using Redis, Memcached, or local storage). This serves repeated data requests from the cache rather than querying the Tekla database every time, protecting your production server's performance.
2. Can I filter data before it reaches my application?
Yes. DreamFactory supports SQL-like filters directly in the API call. For example, to get only active jobs, your frontend can request:
GET /api/v2/tekla_db/_table/Jobs?filter=(Status='Active')
3. Can I use this for "Write" operations (updating inventory)?
Yes, DreamFactory automatically generates POST, PUT, and PATCH endpoints. However, because Tekla PowerFab has complex internal logic, we recommend restricting "Write" access to non-critical tables via the Access settings in your Role, or using DreamFactory's scripting engine to validate data against business rules before allowing the update.
4. Tekla has complex table relationships. How are those handled?
DreamFactory handles joined data gracefully. You can retrieve a parent record and its children in a single API call using the related parameter. Other options include our Data mesh merging tables functionality in the Schema section of the menu. DreamFactory can also read Views or Store Procedures if you decide to leverage some of the MySQL database functionality.
Example:
GET /api/v2/tekla_db/_table/Jobs?related=Drawings
Conclusion
Modernizing your steel fabrication software stack doesn't require ripping and replacing your core systems. By using DreamFactory to read data from the Tekla PowerFab database, you can securely expose your legacy data to the modern world, enabling real-time dashboards and mobile apps without the backend headaches.
Kevin Hood is an accomplished solutions engineer specializing in data analytics and AI, enterprise data governance, data integration, and API-led initiatives.
