Skip to main content
GET
/
v2
/
capacities
/
{id}
Get capacity
curl --request GET \
  --url https://api.sfcompute.com/v2/capacities/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "resource_path": "<string>",
  "owner": "<string>",
  "workspace": "<string>",
  "name": "<string>",
  "kind": "market",
  "object": "capacity",
  "zones": [
    "richmond"
  ],
  "allocation_schedule": {
    "total": [
      {
        "effective_at": 1738972800,
        "node_allocation": 123
      }
    ],
    "by_zone": {}
  },
  "created_at": 1738972800,
  "procurements": [
    "<string>"
  ],
  "deployments": [
    "<string>"
  ],
  "tags": {
    "env": "prod",
    "team": "infra"
  }
}

Authorizations

Authorization
string
header
required

Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.

Path Parameters

id
string
required

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.

Pattern: (cap_[0-9a-zA-Z_-]{1,21})|(sfc:capacity:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){1,3})
Example:

"cap_k3R-nX9vLm7Qp2Yw5Jd8F"

Query Parameters

schedule_history_minutes
integer<u-int64>
default:0

How many minutes of past schedule to include.

Required range: 0 <= x <= 1440
expand
enum<string>[]

Expand related resources inline instead of returning IDs.

Available options:
procurements,
deployments

Response

Capacity details.

id
string
required
Pattern: cap_[0-9a-zA-Z_-]{1,21}
Example:

"cap_k3R-nX9vLm7Qp2Yw5Jd8F"

resource_path
string
required

A resource path for a capacity resource. Format: sfc:capacity:::.

Pattern: sfc:capacity:([a-zA-Z0-9._-]+:){2}[a-zA-Z0-9._-]+
Example:

"sfc:capacity:<account_id>:<workspace>:<name>"

owner
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

workspace
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

name
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

kind
enum<string>
required

Capacity kind determines what operations are allowed on a capacity.

  • Market: User-created capacities. - Originating: Provider capacities for selling compute. Cannot add compute (buy orders/procurements). - ReadOnly: System-managed capacities used for legacy compute, bare metal contracts, and other. Cannot be modified through the API.
Available options:
market,
originating,
read_only
object
string
default:capacity
required
read-only
Allowed value: "capacity"
zones
string[]
required

Datacenter locations orders into this capacity can acquire compute from.

Minimum array length: 1
allocation_schedule
object
required

Allocation schedule of this capacity. Add to the schedule by placing buy orders into this capacity.

created_at
integer<int64>
required

Unix timestamp.

Example:

1738972800

procurements

Active procurements targeting this capacity. Returns IDs by default, or summaries when expand=procurements is set.

Pattern: proc_[0-9a-zA-Z_-]{1,21}
deployments

Active deployments targeting this capacity. Returns IDs by default, or summaries when expand=deployments is set.

Pattern: depl_[0-9a-zA-Z_-]{1,21}
tags
object

Metadata tags attached to this capacity.

Example:
{ "env": "prod", "team": "infra" }