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"
}
}Retrieve a capacity by ID, resource path, or name, including its compute schedule.
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"
}
}Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.
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.
(cap_[0-9a-zA-Z_-]{1,21})|(sfc:capacity:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){1,3})"cap_k3R-nX9vLm7Qp2Yw5Jd8F"
How many minutes of past schedule to include.
0 <= x <= 1440Expand related resources inline instead of returning IDs.
procurements, deployments Capacity details.
cap_[0-9a-zA-Z_-]{1,21}"cap_k3R-nX9vLm7Qp2Yw5Jd8F"
A resource path for a capacity resource. Format: sfc:capacity:
sfc:capacity:([a-zA-Z0-9._-]+:){2}[a-zA-Z0-9._-]+"sfc:capacity:<account_id>:<workspace>:<name>"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
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.market, originating, read_only "capacity"Datacenter locations orders into this capacity can acquire compute from.
1Allocation schedule of this capacity. Add to the schedule by placing buy orders into this capacity.
Show child attributes
Unix timestamp.
1738972800
Active procurements targeting this capacity. Returns IDs by default, or summaries when expand=procurements is set.
proc_[0-9a-zA-Z_-]{1,21}Active deployments targeting this capacity. Returns IDs by default, or summaries when expand=deployments is set.
depl_[0-9a-zA-Z_-]{1,21}Metadata tags attached to this capacity.
Show child attributes
{ "env": "prod", "team": "infra" }