---
title: "List instances"
method: GET
path: "/preview/v2/instances"
tags: ["Instances"]
---

# List instances

`GET /preview/v2/instances`

> ⚠️ This endpoint is in [public preview](/preview/roadmap).

List all instances.

## Query parameters

- `workspace` string — A resource path like 'sfc:workspace:acme:my-workspace' _or_ an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.
- `id` InstanceId[]
  - union — Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
    - string
    - string — Legacy alias prefix; accepted on read, never emitted on write.
- `pool` ResourcePathOrIdPoolId[]
- `status` InstanceStatus[]
- `created_after` integer
- `created_before` integer
- `instance_sku` InstanceSkuId[]
  - union — Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
    - string
    - string — Legacy alias prefix; accepted on read, never emitted on write.
- `limit` integer
- `starting_after` string
- `ending_before` string
- `include` InstanceInclude[]
- `tag` string[]
- `tag_key` string[]

## Response `200`

Paginated list of instances.

- ListInstancesResponse
  - `object` 'list', required
  - `cursor` string
  - `has_more` boolean, required
  - `data` InstanceResponse[], required
    - `id` union, required — Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
      - string
      - string — Legacy alias prefix; accepted on read, never emitted on write.
    - `resource_path` string, required — A resource path for a instance resource. Format: sfc:instance:<account>:<workspace>:<name>.
    - `owner` string, required
    - `workspace` string, required
    - `workspace_id` string, required
    - `name` string, required
    - `object` 'instance', required
    - `status` 'awaiting_allocation' | 'running' | 'terminated' | 'failed', required — `awaiting_allocation` when waiting for compute allocation on its capacity, `running` once assigned and the physical machine is running (still takes time for the image to be downloaded and booted), `terminated` when stopped by the user or after running out of allocation, `failed` on hardware fault. Values are not exhaustive across API versions. Clients should tolerate new statuses.
    - `instance_sku` InstanceSkuSummary, required — A summary of an instance SKU - its `id` and human-recognizable `alias` - embedded on resources that reference a SKU.
      - `object` 'instance_sku', required
      - `id` union, required — Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
        - string
        - string — Legacy alias prefix; accepted on read, never emitted on write.
      - `alias` string, required
    - `capacity` CapacitySummary, required
      - `id` union, required — Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
        - string
        - string — Legacy alias prefix; accepted on read, never emitted on write.
      - `name` string, required
    - `pool` PoolSummary, required — A pool referenced by id and name.
      - `id` string, required
      - `name` string, required
    - `created_at` integer, required — Unix timestamp.
    - `updated_at` integer, required — Unix timestamp.
    - `image` ImageSummary, required
      - `id` union, required — Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
        - string
        - string — Legacy alias prefix; accepted on read, never emitted on write.
      - `name` string, required
    - `managed_by` union
      - object
        - `id` string, required
        - `name` string, required
        - `object` 'deployment', required
      - object
        - `id` string, required
        - `name` string, required
        - `object` 'spot_deployment', required
    - `cloud_init_user_data_used` boolean, required — Whether cloud-init user data is configured for this instance.
    - `cloud_init_user_data` string, byte — Base64-encoded [cloud-init user data](https://cloudinit.readthedocs.io/en/latest/explanation/format/index.html).
    - `enable_public_ipv4` boolean — Whether this instance requires a public IPv4 address. When `false`, only SSH (TCP port 22) is open on the instance and no other ports accept inbound traffic.
    - `public_ip` string — Public IPv4 address assigned to this instance. Present only when `enable_public_ipv4 = true`; omitted otherwise.
    - `firewall` string
    - `tags` Tags
    - `expected_shutdown_at` integer — Unix timestamp.
    - `priority_level` 'yield' | 'normal' | 'preferred' | 'critical' — Instance priority — a relative ranking that determines which instances the system prefers to keep running when capacity is constrained. When a capacity's quota drops below its running-instance count, instances are terminated in priority order (lower first). Ordering: `yield < normal < preferred < critical`.

## Other responses

- `401` — Unauthorized.
- `403` — Forbidden.
- `404` — Capacity not found.
- `422` — Validation failed.
- `500` — Internal server error.

---

[API](https://skmtc.dev/sfcompute/apis/sfc-api.md) · [All operations](https://skmtc.dev/sfcompute/apis/sfc-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sfcompute/sfc-api/revisions/f3ff1539c0d9/schema)
