> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.islo.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.islo.dev/_mcp/server.

# Get sandbox

GET https://ca.compute.islo.dev/sandboxes/{sandbox_name}

Get the current status and configuration of a sandbox by name. Use this endpoint after creation to tell when the sandbox is ready, or to read back its image and lifecycle policy. For example, request `GET /sandboxes/preview-env` to inspect the sandbox created in the create example.

Reference: https://docs.islo.dev/api-reference/sandboxes/get-sandbox

## Request

### Path parameters

- `sandbox_name` (string, required) — Sandbox name, for example `preview-env`.

## Response

### 200

Sandbox details

- `created_at` (string, required)
- `id` (string, required)
- `image` (string, required)
- `name` (string, required)
- `status` (string, required)
- `created_by` (string, optional, nullable)
- `creation_phase` (string, optional, nullable)
- `deleted_at` (string, optional, nullable)
- `lifecycle` (LifecyclePolicy, optional, nullable)
- `setup_steps` (list of SetupStepResult, optional, nullable)
- `spec` (SandboxSpec, optional, nullable)
- `workdir` (string, optional, nullable)

## Errors

### 401 Unauthorized Error

Unauthorized

- `code` (enum, required)
  - Allowed values: `AUTH_REQUIRED`, `INVALID_REQUEST`, `NOT_FOUND`, `VALIDATION_ERROR`, `SANDBOX_NOT_FOUND`, `SANDBOX_ALREADY_EXISTS`, `SANDBOX_INVALID_STATE`, `SANDBOX_PROVISIONING_FAILED`, `RESOURCE_NOT_FOUND`, `FILE_NOT_FOUND`, `COMMAND_NOT_FOUND`, `EXEC_FAILED`, `FILE_OPERATION_ERROR`, `RESOURCE_UNAVAILABLE`, `ACCESS_DENIED`, `CACHE_CONFLICT`, `BILLING_NOT_ALLOWED`, `TENANT_SUSPENDED`, `TENANT_DELETED`, `RATE_LIMITED`, `TIMEOUT`, `GONE`, `BAD_GATEWAY`, `INTERNAL_ERROR`
- `message` (string, required)
- `available` (long, optional, nullable)
- `limit` (long, optional, nullable)
- `request_id` (string, optional, nullable)
- `requested` (long, optional, nullable)
- `resource` (string, optional, nullable) — Optional capacity fields populated for `InsufficientResources` errors so clients (including peer agents) can recover the typed payload across HTTP boundaries instead of collapsing it to an opaque message.

### 404 Not Found Error

Sandbox not found

- `code` (enum, required)
  - Allowed values: `AUTH_REQUIRED`, `INVALID_REQUEST`, `NOT_FOUND`, `VALIDATION_ERROR`, `SANDBOX_NOT_FOUND`, `SANDBOX_ALREADY_EXISTS`, `SANDBOX_INVALID_STATE`, `SANDBOX_PROVISIONING_FAILED`, `RESOURCE_NOT_FOUND`, `FILE_NOT_FOUND`, `COMMAND_NOT_FOUND`, `EXEC_FAILED`, `FILE_OPERATION_ERROR`, `RESOURCE_UNAVAILABLE`, `ACCESS_DENIED`, `CACHE_CONFLICT`, `BILLING_NOT_ALLOWED`, `TENANT_SUSPENDED`, `TENANT_DELETED`, `RATE_LIMITED`, `TIMEOUT`, `GONE`, `BAD_GATEWAY`, `INTERNAL_ERROR`
- `message` (string, required)
- `available` (long, optional, nullable)
- `limit` (long, optional, nullable)
- `request_id` (string, optional, nullable)
- `requested` (long, optional, nullable)
- `resource` (string, optional, nullable) — Optional capacity fields populated for `InsufficientResources` errors so clients (including peer agents) can recover the typed payload across HTTP boundaries instead of collapsing it to an opaque message.

## Types

### LifecyclePolicy

- `auto_resume` (enum, optional)
  - Allowed values: `never`, `on_activity`
- `delete_after` (long, optional, nullable)
- `pause_after` (long, optional, nullable)
- `pause_after_idle` (long, optional, nullable)

### SetupStepResult

- `name` (string, required)
- `status` (string, required)
- `stderr` (string, optional, nullable)
- `stdout` (string, optional, nullable)

### SandboxSpec

- `disk_gb` (integer, required)
- `memory_mb` (integer, required)
- `vcpus` (integer, required)

## Examples

**Response**

```json
{
  "created_at": "2026-10-30T12:00:00Z",
  "id": "sbx_1234567890",
  "image": "ghcr.io/islo-labs/islo-runner:latest",
  "name": "preview-env",
  "status": "running"
}
```

**SDK Code**

```python sandboxes_get_sandbox_example
import requests

url = "https://ca.compute.islo.dev/sandboxes/preview-env"

response = requests.get(url)

print(response.json())
```

```javascript sandboxes_get_sandbox_example
const url = 'https://ca.compute.islo.dev/sandboxes/preview-env';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go sandboxes_get_sandbox_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://ca.compute.islo.dev/sandboxes/preview-env"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby sandboxes_get_sandbox_example
require 'uri'
require 'net/http'

url = URI("https://ca.compute.islo.dev/sandboxes/preview-env")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java sandboxes_get_sandbox_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://ca.compute.islo.dev/sandboxes/preview-env")
  .asString();
```

```php sandboxes_get_sandbox_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://ca.compute.islo.dev/sandboxes/preview-env');

echo $response->getBody();
```

```csharp sandboxes_get_sandbox_example
using RestSharp;

var client = new RestClient("https://ca.compute.islo.dev/sandboxes/preview-env");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift sandboxes_get_sandbox_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://ca.compute.islo.dev/sandboxes/preview-env")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```