> 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 by ID

GET https://ca.compute.islo.dev/sandboxes/-/by-id/{id}

Return details for a sandbox by public ID.

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

## Request

### Path parameters

- `id` (string, required) — Sandbox public ID (UUID)

## 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`, `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`, `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

**Request**

```json
{}
```

**Response**

```json
{
  "created_at": "2024-06-10T09:45:00Z",
  "id": "a3f1c9e2-7b4d-4f6a-9c2e-1d5b7f8a9e0c",
  "image": "python:3.10-slim",
  "name": "Data Science Sandbox",
  "status": "running",
  "created_by": "user_8f3a2c1d",
  "creation_phase": "initializing",
  "deleted_at": null,
  "lifecycle": null,
  "setup_steps": [
    {
      "name": "Install dependencies",
      "status": "completed",
      "stderr": null,
      "stdout": "All packages installed successfully."
    }
  ],
  "spec": null,
  "workdir": "/home/sandbox/project"
}
```

**SDK Code**

```python
import requests

url = "https://ca.compute.islo.dev/sandboxes/-/by-id/id"

payload = {}
headers = {"Content-Type": "application/json"}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://ca.compute.islo.dev/sandboxes/-/by-id/id';
const options = {method: 'GET', headers: {'Content-Type': 'application/json'}, body: '{}'};

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

```go
package main

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

func main() {

	url := "https://ca.compute.islo.dev/sandboxes/-/by-id/id"

	payload := strings.NewReader("{}")

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

	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

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

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

request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"

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

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

HttpResponse<String> response = Unirest.get("https://ca.compute.islo.dev/sandboxes/-/by-id/id")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://ca.compute.islo.dev/sandboxes/-/by-id/id', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://ca.compute.islo.dev/sandboxes/-/by-id/id");
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://ca.compute.islo.dev/sandboxes/-/by-id/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```