> For the complete documentation index, see [llms.txt](https://docs.orchard.airoverflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.orchard.airoverflow.com/api/resources/instances.md).

# Sandboxes (instances)

A sandbox is one device: an iOS or Android guest on a node, or a cloud sandbox. This page covers the shared list and the per-sandbox endpoints for **node** sandboxes, which are addressed by their stable `uuid`. Cloud sandboxes are on [External sandboxes](/api/resources/remote.md).

## List and discovery

| Method | Path                                                            | Does                                                                                                        |
| ------ | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| GET    | `/instances`                                                    | Every sandbox in the active workspace, node and cloud, in one list (`{ instances: [...], errors: [...] }`). |
| GET    | `/providers`                                                    | Device providers and whether each is usable.                                                                |
| GET    | `/catalog`, `/android/catalog`, `/sim/device-types`, `/presets` | Create-time catalogs (firmware, Android images, simulator runtimes, iOS patch presets).                     |
| GET    | `/jobs`                                                         | Long-running jobs (VM builds, image installs).                                                              |

## Create

| Method | Path                    | Body                         |
| ------ | ----------------------- | ---------------------------- |
| POST   | `/instances/create`     | Build an iOS VM (async job). |
| POST   | `/instances/create-sim` | Create an iOS simulator.     |

Android and Cuttlefish are created through their node provider; the console's Launch flow fills these in. Cloud sandboxes use `/remote/create`.

## Per-sandbox

All paths below are under `/sandboxes/<uuid>`.

### Lifecycle and detail

| Method | Path             | Does                                                 |
| ------ | ---------------- | ---------------------------------------------------- |
| GET    | \`\`             | Full detail (the sandbox shape).                     |
| PATCH  | \`\`             | Edit notes, tag, or size (cpu/memory, stopped only). |
| DELETE | \`\`             | Terminate: stop and delete the guest and its disk.   |
| POST   | `start` / `stop` | Boot / stop.                                         |
| GET    | `key`            | Connection details for the device.                   |

### Input and screen

| Method | Path          | Does                                 |
| ------ | ------------- | ------------------------------------ |
| GET    | `screenshot`  | One PNG/JPEG frame (raw bytes).      |
| POST   | `control`     | One input action: \`{ action: tap    |
| POST   | `tap`         | `{ x, y }`.                          |
| GET    | `describe-ui` | Accessibility tree, where supported. |

For a live screen, use a WebSocket channel (VNC, H.264 stream, or WebRTC) from [WebSocket channels](/api/resources/websockets.md). Do not poll `screenshot` in a loop.

### Files and apps

| Method | Path             | Does                                                      |
| ------ | ---------------- | --------------------------------------------------------- |
| GET    | `files`          | List a directory (`?path=`).                              |
| POST   | `files/grant`    | Mint a signed one-shot download grant.                    |
| POST   | `files/upload`   | Upload a file (multipart).                                |
| GET    | `apps`           | Installed apps.                                           |
| POST   | `apps/install`   | Install an `.apk`/`.ipa` (multipart; split APKs allowed). |
| POST   | `apps/grant`     | Signed grant to pull an installed APK.                    |
| POST   | `apps/uninstall` | `{ package }`.                                            |

Signed downloads are fetched from `/files/download` and `/apps/download` with the grant as the credential (no path is taken from the caller).

### Instrumentation

| Method          | Path       | Does                                                                  |
| --------------- | ---------- | --------------------------------------------------------------------- |
| GET/POST        | `frida`    | Frida status; start/stop/install/verify/inject (see the sub-actions). |
| GET/POST        | `root`     | adb root + Magisk (Android).                                          |
| GET/POST        | `debugger` | On-device lldb-server.                                                |
| GET/POST/DELETE | `proxy`    | The guest's system proxy.                                             |
| GET/DELETE      | `tunnel`   | Reverse tunnel state.                                                 |
| GET/POST/DELETE | `mitm`     | Hosted traffic capture.                                               |
| GET             | `mitm/ca`  | The mitmproxy CA (PEM).                                               |

### Metrics, snapshots, templates

| Method   | Path                       | Does                             |
| -------- | -------------------------- | -------------------------------- |
| GET      | `metrics`                  | Device metrics, where supported. |
| GET      | `storage`                  | Storage breakdown.               |
| GET/POST | `snapshots`                | List / create a snapshot.        |
| POST     | `snapshots/<name>/restore` | Restore.                         |
| DELETE   | `snapshots/<name>`         | Delete a snapshot.               |
| POST     | `template`                 | Save as a reusable template.     |

Interactive channels (shell, adb, gdb, lldb console, live screen, frida stream) are WebSockets: see [WebSocket channels](/api/resources/websockets.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.orchard.airoverflow.com/api/resources/instances.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
