v44

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-20129390589.6 KB
Capacities

List capacities

⚠️ This endpoint is in public preview.

List all capacities.

get/preview/v2/capacities

Query parameters

workspacestring 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.

Example:wksp_k3R-nX9vLm7Qp2Yw5Jd8F

Filter by workspace.

idSfcApiResourcePathOrIdCapacityId[]

Filter by capacity ID, resource path, or name (repeatable).

[
  "cap_k3R-nX9vLm7Qp2Yw5Jd8F"
]
limitinteger
starting_afterstring
Example:capc_gqXR7s0Kj5mHvE2wNpLc4Q

Set to the response's cursor to fetch the next page.

ending_beforestring
Example:capc_gqXR7s0Kj5mHvE2wNpLc4Q

Set to the response's cursor to fetch the previous page.

schedule_history_minutesinteger

How many minutes of past schedule to include.

tagstring[]

Filter by tag key-value pair (repeatable). Format: key=value (the = between key and value must be percent-encoded in the URL).

tag_keystring[]

Filter by tag key existence (repeatable). Returns resources that have a tag with this key, regardless of the value.

Response

Paginated list of capacities.

object'list' required
cursorstring
has_moreboolean required

Example response

{
  "object": "list",
  "cursor": "capc_gqXR7s0Kj5mHvE2wNpLc4Q",
  "data": [
    {
      "id": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
      "resource_path": "sfc:capacity:<account_id>:<workspace>:<name>",
      "owner": "my-resource-name",
      "workspace": "my-resource-name",
      "name": "my-resource-name",
      "object": "capacity",
      "allocation_schedule": {
        "total": [
          {
            "start_at": 1738972800,
            "end_at": 1738972800
          }
        ]
      },
      "procurements": [
        {
          "id": "proc_k3R-nX9vLm7Qp2Yw5Jd8F",
          "name": "my-resource-name"
        }
      ],
      "deployments": [
        {
          "id": "depl_k3R-nX9vLm7Qp2Yw5Jd8F",
          "name": "my-resource-name"
        }
      ],
      "created_at": 1738972800,
      "tags": {
        "env": "prod",
        "team": "infra"
      }
    }
  ]
}