REST API
Centrally manage and test REST API endpoints
Overview
The REST API module connects DMAIC.io to external data sources. It performs HTTP GET requests against a URL, maps individual fields of the JSON response to columns in the worksheet, and can run on a schedule — e.g. to regularly pull measurements from a server, a machine controller, or a cloud service into the worksheet.
Endpoint: A saved entry with name, URL, optional HTTP headers, and a mapping table. Any number of endpoints can be managed per project — e.g. one per machine or per data source.
JSON path: A dot notation that addresses a specific value or array in the API response (e.g. data.measurements or result.values[*].temperature). The value behind this path is written to the assigned worksheet column.
Mapping (JSON path → column): A list of assignments: each entry maps one JSON path to one target column in the worksheet. On every fetch, values are written according to these mappings.
Write mode: Controls how fetched values are written to the columns — either replace (old values are overwritten) or append (new values are added at the bottom). Append is suitable for ongoing data capture.
Schedule: Optional repeating fetch in minutes or hours. As long as the module is open, it automatically calls the endpoint at the configured interval.
Operation
Setting up an endpoint
- Use "+" to create a new endpoint and give it a meaningful name.
- Enter the URL — typically a REST interface that returns JSON.
- Add HTTP headers if needed (e.g. Authorization for API keys or bearer tokens).
- Click the play button to run a test fetch — the response is displayed for inspection.
- Identify JSON paths in the response and assign each one to a worksheet column.
- Pick the write mode: replace or append.
- Optional: enable the schedule and enter an interval in minutes or hours.
Managing endpoints
- Endpoints can be duplicated — handy for several similar data sources.
- Deleting an endpoint automatically stops a running schedule.
- The full state (endpoints, mappings, schedules) is included in the project export.
Pitfalls
CORS errors: Browsers block cross-origin API calls by default unless the server sends the right CORS headers. Solution: enable CORS on the endpoint or use a proxy. Symptom: network error without a response body.
Sensitive data in headers: API keys, bearer tokens, and passwords are stored in clear text inside the project and included in exports. Check data before sharing or rotate tokens regularly.
Wrong JSON path: Typos or the wrong nesting depth cause empty columns to be written. Always run a test fetch and check the result before using the endpoint productively.
Write mode "replace" with a schedule: With "replace" enabled and a schedule running, the sheet content is overwritten on every fetch — old values are lost. For time series, choose "append".
Schedule only runs while the module is open: The recurring fetch runs in the browser tab. Closing the module or the browser stops the schedule. For real background acquisition, a server-side job is required.
Very short intervals: Intervals below one minute put a heavy load on the browser and the remote endpoint. For high-frequency data, buffer on the server side and fetch in larger steps.