Skip to main content
Use this endpoint to fetch the current state of a single capsule by its ID. This is useful for polling status after a create, pause, or resume call, or for inspecting resource allocation before running commands.

Endpoint

GET https://app.wrenn.dev/api/v1/capsules/{id}

Authentication

Pass your API key in the X-API-Key header.
X-API-Key: wrn_your_key

Path parameters

id
string
required
The capsule ID to retrieve (e.g., cl-abc123).

Response

Returns 200 OK with the capsule object.
id
string
required
Unique capsule ID, prefixed with cl-.
status
string
required
Current lifecycle status. One of: pending, starting, running, paused, stopped, error.
template
string
required
Name of the template used to create the capsule.
vcpus
integer
required
Number of virtual CPUs allocated.
memory_mb
integer
required
Memory allocated, in MiB.
timeout_sec
integer
required
Inactivity TTL in seconds. 0 means auto-pause is disabled.
created_at
string
required
ISO 8601 timestamp of when the capsule was created.
last_updated
string
required
ISO 8601 timestamp of the most recent status change.
started_at
string
ISO 8601 timestamp of when the capsule last reached running status. null if the capsule has never booted.
last_active_at
string
ISO 8601 timestamp of the last exec call or ping.

Example response

{
  "id": "cl-abc123",
  "status": "running",
  "template": "base-python",
  "vcpus": 2,
  "memory_mb": 1024,
  "timeout_sec": 300,
  "created_at": "2024-11-01T10:00:00Z",
  "started_at": "2024-11-01T10:00:05Z",
  "last_active_at": "2024-11-01T10:04:30Z",
  "last_updated": "2024-11-01T10:00:05Z"
}

curl

curl --request GET \
  --url https://app.wrenn.dev/api/v1/capsules/cl-abc123 \
  --header 'X-API-Key: wrn_your_key'

Python SDK

from wrenn import Capsule

# Fetch metadata by ID without attaching to the capsule
info = Capsule.get_info("cl-abc123")
print(info.status)    # "running"
print(info.template)  # "base-python"

# Or refresh metadata on an existing instance
capsule = Capsule.connect("cl-abc123")
info = capsule.get_info()
print(info.status)

Error responses

StatusDescription
401 UnauthorizedMissing or invalid X-API-Key.
404 Not FoundNo capsule with the given ID exists in your team.