ApplesauceOS
Read Markdown ↗Download .md

HTTP endpoints

Control the installed device server from your own HTTP client. This reference covers 54 registered method/path pairs. Each endpoint has parameters, a response description and a small curl example.

Which address should I use?

AddressPurpose
http://DEVICE_LAN_IP:8080Direct access to your phone or iPad on a reachable local network
http://127.0.0.1:18080Your computer, only after forwarding USB port 18080 to device port 8080
https://mcp.applesauceos.com/mcpMCP protocol with client authorization; it does not expose these paths directly

No SSH is needed. Enable the device HTTP server in ApplesauceOS settings. Direct HTTP is unencrypted and does not use MCP pairing; use a trusted network or USB forwarding. Do not expose port 8080 publicly. If using MCP, call its tools instead of constructing device URLs.

Make your first request

Replace the example IP with your device’s address:

sh
DEVICE_URL='http://192.168.1.42:8080'
curl --fail-with-body "$DEVICE_URL/endpoints"

For USB, run iproxy 18080:8080 on your computer and keep it running; use DEVICE_URL='http://127.0.0.1:18080' in another terminal. Device trust/pairing is required. The curl examples use a shell variable on your computer, not a JavaScript API.

Save, run and inspect a script

sh
curl --fail-with-body "$DEVICE_URL/files/write" \
  -H 'Content-Type: application/json' \
  -d '{"path":"Hello.cso/main.js","content":"console.log(\"Hello\");","overwrite":false}'

curl --fail-with-body "$DEVICE_URL/scripts/run" \
  -H 'Content-Type: application/json' \
  -d '{"path":"Hello.cso","repeat":1}'

# Replace RUN_UUID with the id returned above.
curl --fail-with-body "$DEVICE_URL/scripts/runs?id=RUN_UUID"

If the file already exists, read its current hash and follow the overwrite rules; do not blindly replace it. A submitted run is not a finished run. Poll its ID with a finite deadline and inspect both state and errors.

Choose the right execution route

NeedStartInspectStop
Normal saved script or .cso/.aso projectPOST /scripts/runGET /scripts/runs?id=...POST /scripts/stop with id
Async JS body using return/awaitPOST /automation/runGET /automation/runs?id=...POST /automation/stop with runId

Send JSON POST bodies with Content-Type: application/json. URL-encode query values. Response objects below describe fields, not a promise that every optional field is always present. Screenshots return PNG and some status/log routes return plain text.

Browse by task

Discovery

Apps and device

Script files

Saved scripts

JavaScript jobs

UIHelper HTTP

Diagnostics

Settings

Shared behavior

OPTIONS returns 204 for any path; it is not a capability check. Unknown method/path pairs return 404. Some GET routes change state (for example /stopAll, /logs/clear and settings toggles); do not prefetch or crawl those routes.

Read HTTP workflows, field details and error handling for file conflicts, observations, script arguments and limits. Discover the exact installed route set with GET /endpoints.