curl --request PATCH \
--url https://api.sfcompute.com/preview/v2/instances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"id": "<string>",
"priority": 123
}
]
}
'{
"object": "list",
"data": [
{
"id": "<string>",
"resource_path": "<string>",
"owner": "<string>",
"workspace": "<string>",
"name": "<string>",
"object": "instance",
"status": "awaiting_allocation",
"capacity": {
"id": "<string>",
"name": "<string>"
},
"created_at": 1738972800,
"image": {
"id": "<string>",
"name": "<string>"
},
"cloud_init_user_data_used": true,
"priority": 123,
"instance_sku": {
"id": "<string>",
"name": "<string>"
},
"deployment": {
"id": "<string>",
"name": "<string>"
},
"cloud_init_user_data": "IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo=",
"tags": {
"env": "prod",
"team": "infra"
},
"expected_shutdown_at": 1738972800
}
]
}⚠️ This endpoint is in preview.
Update one or more instances atomically. All listed instances must be in the same workspace; mixed-workspace batches are rejected with 422.
curl --request PATCH \
--url https://api.sfcompute.com/preview/v2/instances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"id": "<string>",
"priority": 123
}
]
}
'{
"object": "list",
"data": [
{
"id": "<string>",
"resource_path": "<string>",
"owner": "<string>",
"workspace": "<string>",
"name": "<string>",
"object": "instance",
"status": "awaiting_allocation",
"capacity": {
"id": "<string>",
"name": "<string>"
},
"created_at": 1738972800,
"image": {
"id": "<string>",
"name": "<string>"
},
"cloud_init_user_data_used": true,
"priority": 123,
"instance_sku": {
"id": "<string>",
"name": "<string>"
},
"deployment": {
"id": "<string>",
"name": "<string>"
},
"cloud_init_user_data": "IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo=",
"tags": {
"env": "prod",
"team": "infra"
},
"expected_shutdown_at": 1738972800
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.sfcompute.com/llms.txt
Use this file to discover all available pages before exploring further.
Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.
Request body for PATCH /v2/instances (batch). Each entry in data applies a partial patch to one instance; instances not mentioned are untouched. All entries must succeed or none — a single failure rolls back every other entry's writes (422).
Duplicate id entries are not deduplicated by serde; the handler runs the patches in order, so the last write wins.
Show child attributes
Instances updated.
Response shape for PATCH /v2/instances (batch). Mirrors the input list — one InstanceResponse per unique id in the request body, reflecting the post-write state. Unlike the paginated list response, there's no cursor or has_more: the response is exactly the instances the caller mentioned, no pagination involved.