Monitor a REST API from your iPhone
Updated
Routix Dash turns your iPhone or iPad into a live monitor for REST APIs. It calls an address on a schedule and shows whether it answered, how long it took, and any field of the answer, on a dashboard you design. No server, agent or account is needed: the requests go straight from your device.
Use it to watch a health endpoint, a queue length, a price, a build status, or your own backend while you develop it.
1. Create the data source
Open the menu → Data sources → Add data source:
- Set Name to
API health. - Leave Data source type as HTTP.
- Open the first HTTP request in the Actions / Transformers pipe and set URL to the address to watch, for example
https://api.example.com/health. - If the API needs a key, add it under Headers, for example
Authorizationwith the valueBearer {{ env.api_token }}. Store the key itself under the menu → Data → ENV variables. - Set Trigger interval (ms) to how often to check, for example
30000for every 30 seconds.
Tap the save tick.
2. Show a field of the answer
On a data section, tap Add data piece manually and pick Design your own data piece. Set API health as the root data source.
Add a Label, turn Inherited off, and under Data transformers pipe tap Add... → Simple expression. For an answer like {"status": "ok", "queue": 12} enter value?.status.
Add more components for other fields. A Dial gauge with Default value set to {{ value.queue }} and Warning from / Alarm from levels shows at a glance when the queue grows.
3. Show the response time and the status code
Details about the request itself are available next to the answer:
| Expression | What it shows |
|---|---|
ctx.transport.responseTime ?? 0 |
How long the request took, in milliseconds |
ctx.transport.statusCode |
The HTTP status code, such as 200 or 503 |
Add a Label with a Simple expression transformer for each. To see the response time over the last checks, add a Chart with ctx.transport.responseTime ?? 0: every check adds a point.
4. Make failures visible
Add an Alarm banner to the data piece. It shows only while there is something to report. Give it a Simple expression transformer that returns a message when the answer is wrong and an empty text otherwise:
value?.status == "ok" ? "" : "API problem"
A Status dot next to it follows the data source: it changes color when a request fails.
5. Send a test request with a tap
Add a Button and under Events → On tap choose HTTP request. Set the method, the address and the body. One tap sends a POST, clears a cache, or restarts a job, and the answer can be shown on the data piece.
See Get started: HTTP POST on tap for the full steps.
Tips
- Several steps, such as login first. Add more than one request to the same data source. They run in order, and a later one can use a value from the answer of an earlier one, for example
Authorization: Bearer {{ value.access_token }}. - Reshape the answer. Use JSONPath, Lua or JavaScript to count items, compute a status, or format a number.
- Checks run while the app is open. Routix Dash is a dashboard you look at. For alerts while your phone is locked, keep a monitoring service next to it.
- Streams. For an API that pushes data, see WebSocket and SSE client for iPhone.