---
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, required — 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` SfcApiInstanceId[]
- `capacity` string — A resource path like 'sfc:capacity:acme:prod:my-capacity' _or_ an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.
- `status` SfcApiInstanceStatus[]
- `limit` integer
- `starting_after` string
- `ending_before` string
- `include` SfcApiInstanceInclude[]
- `tag` string[]
- `tag_key` string[]

## Response `200`

Paginated list of instances.

- SfcApiListInstancesResponse
  - `object` 'list', required
  - `cursor` string
  - `has_more` boolean, required
  - `data` SfcApiInstanceResponse[], required
    - `id` string, required
    - `resource_path` string, required — A resource path for a instance resource. Format: sfc:instance:<account>:<workspace>:<name>.
    - `owner` string, required
    - `workspace` 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.
    - `instance_sku` SfcApiInstanceSkuSummary — Summary view of an instance SKU embedded on responses that reference one (orders, procurements, instances, capacity transfers). Carries both the id and the human-readable name. Legacy SKUs whose `name` column hasn't been backfilled use `UNKNOWN_INSTANCE_SKU_NAME` as a placeholder so this field is always populated on the wire.
      - `id` string, required
      - `name` string, required
    - `capacity` SfcApiCapacitySummary, required
      - `id` string, required
      - `name` string, required
    - `created_at` integer, required — Unix timestamp.
    - `image` SfcApiImageSummary, required
      - `id` string, required
      - `name` string, required
    - `deployment` SfcApiDeploymentSummary
      - `id` string, required
      - `name` string, 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).
    - `tags` SfcApiTags
    - `expected_shutdown_at` integer — Unix timestamp.
    - `priority` integer, required — Shutdown priority. Higher numbers are kept longer when the capacity's quota drops below the running-instance count. Default 0; any signed 64-bit integer is accepted.

## Other responses

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

---

[API](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation.md) · [All operations](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sfcompute/san-francisco-compute-documentation/versions/93dd7661e9bb/schema)
