---
title: "Get box"
method: GET
path: "/boxes/{boxId}"
tags: ["Box"]
---

# Get box

`GET /boxes/{boxId}`

This endpoint retrieves information about a box

## Path parameters

- `boxId` string, required

## Response `200`

Get box

- union
  - LinuxBox — Linux box instance with full configuration and status
    - `id` string, required — Unique identifier for the box
    - `status` 'pending' | 'running' | 'error' | 'terminated', required — The current status of a box instance
    - `createdAt` string, date-time, required — Creation timestamp of the box
    - `updatedAt` string, date-time, required — Last update timestamp of the box
    - `expiresAt` string, date-time, nullable, required — Expiration timestamp of the box
    - `reason` string, nullable — The reason for the current status, if any
    - `type` 'linux', required — Box type is Linux
    - `config` LinuxConfig, required — Complete configuration for Linux box instance
      - `os` LinuxOsConfig, required — Linux operating system configuration
        - `version` string, required — OS version string (e.g. 'ubuntu-20.04')
      - `workingDir` string, required — Working directory path for the box. This directory serves as the default starting point for all operations including command execution, code running, and file system operations. When you execute commands or run code, they will start from this directory unless explicitly specified otherwise.
      - `labels` object, required — Key-value pairs of labels for the box. Labels are used to add custom metadata to help identify, categorize, and manage boxes. Common use cases include project names, environments, teams, applications, or any other organizational tags that help you organize and filter your boxes.
      - `envs` object, required — Environment variables for the box. These variables will be available in all operations including command execution, code running, and other box behaviors
      - `cpu` number, required — CPU cores allocated to the box
      - `memory` number, required — Memory allocated to the box in MiB
      - `storage` number, required — Storage allocated to the box in GiB.
      - `publicIp` string, required — Public IP allocated to the box.
      - `deviceType` 'container' | 'vm' — Device type - container or vm Linux device
      - `snapshotName` string — Snapshot name
      - `snapshotId` string — Snapshot id
  - AndroidBox — Android box instance with full configuration and status
    - `id` string, required — Unique identifier for the box
    - `status` 'pending' | 'running' | 'error' | 'terminated', required — The current status of a box instance
    - `createdAt` string, date-time, required — Creation timestamp of the box
    - `updatedAt` string, date-time, required — Last update timestamp of the box
    - `expiresAt` string, date-time, nullable, required — Expiration timestamp of the box
    - `reason` string, nullable — The reason for the current status, if any
    - `type` 'android', required — Box type is Android
    - `config` AndroidConfig, required — Complete configuration for Android box instance
      - `os` AndroidOsConfig, required — Android operating system configuration
        - `version` '12' | '13' | '15', required — Supported Android versions
      - `deviceType` 'virtual' | 'physical' — Device type - virtual or physical Android device
      - `workingDir` string — Working directory path for the box. This directory serves as the default starting point for all operations including command execution, code running, and file system operations. When you execute commands or run code, they will start from this directory unless explicitly specified otherwise.
      - `labels` object, required — Key-value pairs of labels for the box. Labels are used to add custom metadata to help identify, categorize, and manage boxes. Common use cases include project names, environments, teams, applications, or any other organizational tags that help you organize and filter your boxes.
      - `envs` object, required — Environment variables for the box. These variables will be available in all operations including command execution, code running, and other box behaviors
      - `cpu` number, required — CPU cores allocated to the box
      - `memory` number, required — Memory allocated to the box in MiB
      - `storage` number, required — Storage allocated to the box in GiB

---

[API](https://skmtc.net/babelcloud/apis/gbox-open-api.md) · [All operations](https://skmtc.net/babelcloud/apis/gbox-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/babelcloud/gbox-open-api/versions/d655577fa915/schema)
