curl --request POST \
--url https://api.sfcompute.com/v2/nodes/{id}/terminate \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"resource_path": "<string>",
"owner": "<string>",
"workspace": "<string>",
"name": "<string>",
"object": "node",
"status": "awaiting_allocation",
"capacity": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
"created_at": 1738972800,
"image": "image_k3R-nX9vLm7Qp2Yw5Jd8F",
"cloud_init_user_data_used": true,
"zone": "richmond",
"deployment": "depl_k3R-nX9vLm7Qp2Yw5Jd8F",
"cloud_init_user_data": "IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo=",
"tags": {
"env": "prod",
"team": "infra"
}
}Terminates a running node. Terminated nodes can not be restarted.
curl --request POST \
--url https://api.sfcompute.com/v2/nodes/{id}/terminate \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"resource_path": "<string>",
"owner": "<string>",
"workspace": "<string>",
"name": "<string>",
"object": "node",
"status": "awaiting_allocation",
"capacity": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
"created_at": 1738972800,
"image": "image_k3R-nX9vLm7Qp2Yw5Jd8F",
"cloud_init_user_data_used": true,
"zone": "richmond",
"deployment": "depl_k3R-nX9vLm7Qp2Yw5Jd8F",
"cloud_init_user_data": "IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo=",
"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:node:acme:prod:my-node' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.
(node_[0-9a-zA-Z_-]{1,21})|(sfc:node:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){1,3})"node_k3R-nX9vLm7Qp2Yw5Jd8F"
Node terminated.
node_[0-9a-zA-Z_-]{1,21}"node_k3R-nX9vLm7Qp2Yw5Jd8F"
A resource path for a node resource. Format: sfc:node:
sfc:node:([a-zA-Z0-9._-]+:){2}[a-zA-Z0-9._-]+"sfc:node:<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"
"node"awaiting_allocation when waiting for compute allocation on its capacity, running once assigned and physical node is running (still takes time for image to be downloaded and booted), terminated when stopped by user or after running out of allocation, failed on hardware fault.
awaiting_allocation, running, terminated, failed Capacity this node is utilizing.
cap_[0-9a-zA-Z_-]{1,21}"cap_k3R-nX9vLm7Qp2Yw5Jd8F"
Unix timestamp.
1738972800
Image this node was launched from.
image_[0-9a-zA-Z_-]{1,21}"image_k3R-nX9vLm7Qp2Yw5Jd8F"
Whether cloud-init user data is configured for this node.
Zone this node is running in. Only present when assigned to a physical node.
"richmond"
Deployment managing this node, if any.
depl_[0-9a-zA-Z_-]{1,21}"depl_k3R-nX9vLm7Qp2Yw5Jd8F"
Base64-encoded cloud-init user data.
"IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo="
Metadata tags attached to this node.
Show child attributes
{ "env": "prod", "team": "infra" }