curl --request PUT \
--url https://api.sfcompute.com/v1/nodes/{id}/redeploy \
--header 'Content-Type: application/json' \
--data '
{
"image_id": "vmi_1234567890abcdef",
"cloud_init_user_data": "aGVsbG8gd29ybGQ=",
"override_empty": false
}
'{
"object": "node",
"id": "n_b1dc52505c6db143",
"name": "cuda-crunch",
"zone": "hayesvalley",
"gpu_type": "H100",
"owner": "sfcompute",
"status": "running",
"created_at": 1640995200,
"updated_at": 1640995200,
"start_at": 1640995200,
"end_at": 1641007200,
"max_price_per_node_hour": 1000,
"node_type": "autoreserved",
"procurement_id": "proc_b1dc52505c6de142",
"vms": {
"object": "list",
"data": [
{
"object": "vm",
"id": "vm_oldInstance",
"status": "destroyed",
"created_at": 1640995200,
"updated_at": 1640995200,
"start_at": 1640995200,
"end_at": 1641007200,
"image_id": "vmi_old_id",
"zone": "hayesvalley"
},
{
"object": "vm",
"id": "vm_newInstance",
"status": "running",
"created_at": 1641003600,
"updated_at": 1641003600,
"start_at": 1641003600,
"end_at": 1641007200,
"image_id": "vmi_new_id",
"zone": "hayesvalley"
}
]
},
"current_vm": {
"object": "vm",
"id": "vm_newInstance",
"status": "running",
"created_at": 1641003600,
"updated_at": 1641003600,
"start_at": 1641003600,
"end_at": 1641007200,
"image_id": "vmi_myOZZXw4pfcp7H9DQOldd",
"zone": "hayesvalley"
}
}Redeploy a node by replacing its current VM with a new one. Optionally update the VM image and cloud init user data.
curl --request PUT \
--url https://api.sfcompute.com/v1/nodes/{id}/redeploy \
--header 'Content-Type: application/json' \
--data '
{
"image_id": "vmi_1234567890abcdef",
"cloud_init_user_data": "aGVsbG8gd29ybGQ=",
"override_empty": false
}
'{
"object": "node",
"id": "n_b1dc52505c6db143",
"name": "cuda-crunch",
"zone": "hayesvalley",
"gpu_type": "H100",
"owner": "sfcompute",
"status": "running",
"created_at": 1640995200,
"updated_at": 1640995200,
"start_at": 1640995200,
"end_at": 1641007200,
"max_price_per_node_hour": 1000,
"node_type": "autoreserved",
"procurement_id": "proc_b1dc52505c6de142",
"vms": {
"object": "list",
"data": [
{
"object": "vm",
"id": "vm_oldInstance",
"status": "destroyed",
"created_at": 1640995200,
"updated_at": 1640995200,
"start_at": 1640995200,
"end_at": 1641007200,
"image_id": "vmi_old_id",
"zone": "hayesvalley"
},
{
"object": "vm",
"id": "vm_newInstance",
"status": "running",
"created_at": 1641003600,
"updated_at": 1641003600,
"start_at": 1641003600,
"end_at": 1641007200,
"image_id": "vmi_new_id",
"zone": "hayesvalley"
}
]
},
"current_vm": {
"object": "vm",
"id": "vm_newInstance",
"status": "running",
"created_at": 1641003600,
"updated_at": 1641003600,
"start_at": 1641003600,
"end_at": 1641007200,
"image_id": "vmi_myOZZXw4pfcp7H9DQOldd",
"zone": "hayesvalley"
}
}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.
Node ID or name
Redeploy node with this VM image ID
"vmi_1234567890abcdef"
Update the cloud init user data for VMs running on this node Data should be base64 encoded
"aGVsbG8gd29ybGQ="
If false, then the new VM will inherit any configuration (like image_id, cloud_init_user_data) that is left empty in this request from the current VM.
If true, then any configuration left empty will be set as empty in the new VM. E.g if cloud_init_user_data is left unset and override_empty is true, then the new VM will not have any cloud init user data. override_empty defaults to false.
Node redeployed successfully
"node"
"n_b1dc52505c6db142"
"cuda-crunch"
H100, H200 "sfcompute"
Node Status
pending, awaitingcapacity, running, released, terminated, deleted, failed, unknown autoreserved, reserved "hayesvalley"
Creation time as Unix timestamp in seconds
1640995200
Last updated time as Unix timestamp in seconds
1640995200
Start time as Unix timestamp in seconds
1640995200
End time as Unix timestamp in seconds
1640995200
Deletion time as Unix timestamp in seconds
1640995200
"proc_b1dc52505c6de142"
Max price per hour you're willing to pay for a node in cents
1000
Show child attributes
Show child attributes