# GET /automation/runs

Read a retained JavaScript job and its structured result.

This is a device HTTP route. Set `DEVICE_URL` to your reachable device URL; [connection and examples](https://mcp.applesauceos.com/doc/http.md) explain how. Do not append this path to the public MCP URL.

## Parameters

| Parameter | Type | Meaning |
| --- | --- | --- |
| `id` | query string | Optional runId; omit to list retained jobs. |
| `limit` | query string | List limit 1..64; default 20; ignored when id is supplied. |

## Response

With id: run metadata, state,running,result. Without id: {runs:[...]}, newest first.

## Example

```sh
curl --fail-with-body "$DEVICE_URL/automation/runs?id=RUN_ID"
```

## Notes

States: running, finishing, succeeded, failed, cancelled, interrupted. result contains ok, value or error, runId, timestamps, logs and droppedLogEntries. Result JSON limit: 128 KiB. Logs: 200 events and 64 KiB. At most 64 records retained until deleted. Records survive automation-process restarts; an unfinished job may report interrupted.

Check the HTTP status and any JSON error. [HTTP workflows and error handling](https://mcp.applesauceos.com/doc/http-guide.md) explain shared limits. [All endpoints](https://mcp.applesauceos.com/doc/http.md).
