curl --request POST \
--url https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"instance_pool": {
"subnets": [
{
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
}
],
"vpc": {
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
},
"faults": [
{
"code": "BACKUP_FAILED",
"severity": "error",
"message": "Backup upload failed.",
"details": {},
"first_at": "2023-11-07T05:31:56Z",
"last_at": "2023-11-07T05:31:56Z",
"occurrences": 1
}
],
"autoscaling": {
"enabled": true,
"metrics": [
{
"source": "telemetry",
"target_type": "average_value",
"target_value": 100,
"name": "queue_depth",
"labels": {
"queue": "orders"
},
"sample_aggregation": "last",
"series_aggregation": "sum",
"expected_series": 1,
"window_seconds": 120,
"max_age_seconds": 90
}
],
"warmup_seconds": 180,
"cooldown_seconds": 60,
"scale_down_stabilization_seconds": 300,
"max_scale_out_step": 4,
"max_scale_in_step": 1,
"drain_seconds": 120
},
"autoscaling_status": {
"status": "pending",
"reason": "waiting for sustained lower demand",
"history": [
{
"at": "2023-11-07T05:31:56Z",
"from": 1,
"to": 1,
"reason": "<string>"
}
],
"evaluated_at": "2023-11-07T05:31:56Z",
"last_scaled_at": "2023-11-07T05:31:56Z"
},
"rollout_surge": true,
"retiring_instances": [
{
"requested_at": "2023-11-07T05:31:56Z",
"drain_seconds": 1815,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_acknowledged_at": "2023-11-07T05:31:56Z",
"drain_until": "2023-11-07T05:31:56Z"
}
],
"id": "8f2a1c3d-4e5b-4a6f-9c0d-1e2f3a4b5c6d",
"crn": "crn:compute:sa-saopaulo-1:my-account:instance-pool/web-pool",
"name": "web-asg",
"description": "Front-end autoscaling group",
"desired_count": 2,
"min_count": 1,
"max_count": 3,
"live_count": 2,
"member_count": 2,
"refresh_in_progress": false,
"stale_instance_count": 0,
"status": "active",
"managed_by": "customer",
"tags": {
"environment": "production",
"team": "backend"
},
"template": {
"security_groups": [
{
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
}
],
"floating_ip_assignment": "none",
"iam_role": {
"id": "550e8400-e29b-41d4-a716-446655440005",
"crn": "crn:iam:::role/550e8400-e29b-41d4-a716-446655440005",
"name": "instance-role"
},
"flavor": {
"id": "550e8400-e29b-41d4-a716-446655440003",
"crn": "crn:compute:sa-saopaulo-1:platform:flavor/s1.small",
"name": "s1.small"
},
"image": {
"id": "550e8400-e29b-41d4-a716-446655440004",
"crn": "crn:compute:sa-saopaulo-1:platform:image/ubuntu/architecture/amd64/version/24.04",
"name": "ubuntu"
},
"addresses": [
{
"family": "ipv4",
"address": "<string>"
}
],
"user_data": "aSDinaTvuI8gbWludGxpZnk=",
"metadata": {
"environment": "production",
"team": "backend"
},
"tags": {
"environment": "production",
"team": "backend"
},
"volumes": [
{
"size_gb": 20,
"boot": false,
"volume_type": "nvme",
"performance": {
"iops": 6000,
"throughput_mib_s": 250
},
"mount_path": "/data",
"fstype": "ext4",
"delete_on_termination": true
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "ACCESS_DENIED",
"message": "You don't have permission to perform this action",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "CONFLICT",
"message": "Resource with this name already exists",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Roll every member onto the pool's current launch template
Starts a rolling replacement of every instance not launched from the pool’s current template, including any that predate template tracking.
Asynchronous, and deliberately so: each replacement is a VM boot, and a request that waited would time out long before a pool of any size finished. The reconciler replaces ONE member per pass, and only once the pool is back at size with every member running — so a template that does not boot stalls the roll with the pool intact instead of walking it down one instance at a time.
Capacity does not dip. The pool runs one instance over its target for the duration so a replacement is serving before anything is retired, when headroom is available. At max_count, the refresh waits until headroom becomes available instead of retiring a member below desired_count.
Idempotent: asking again while a roll is running is accepted and does
not restart it. Watch refresh_in_progress and stale_instance_count
on the pool for progress.
curl --request POST \
--url https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.{region}.basaltic.sh/v1/instance-pools/{pool_id}/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"instance_pool": {
"subnets": [
{
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
}
],
"vpc": {
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
},
"faults": [
{
"code": "BACKUP_FAILED",
"severity": "error",
"message": "Backup upload failed.",
"details": {},
"first_at": "2023-11-07T05:31:56Z",
"last_at": "2023-11-07T05:31:56Z",
"occurrences": 1
}
],
"autoscaling": {
"enabled": true,
"metrics": [
{
"source": "telemetry",
"target_type": "average_value",
"target_value": 100,
"name": "queue_depth",
"labels": {
"queue": "orders"
},
"sample_aggregation": "last",
"series_aggregation": "sum",
"expected_series": 1,
"window_seconds": 120,
"max_age_seconds": 90
}
],
"warmup_seconds": 180,
"cooldown_seconds": 60,
"scale_down_stabilization_seconds": 300,
"max_scale_out_step": 4,
"max_scale_in_step": 1,
"drain_seconds": 120
},
"autoscaling_status": {
"status": "pending",
"reason": "waiting for sustained lower demand",
"history": [
{
"at": "2023-11-07T05:31:56Z",
"from": 1,
"to": 1,
"reason": "<string>"
}
],
"evaluated_at": "2023-11-07T05:31:56Z",
"last_scaled_at": "2023-11-07T05:31:56Z"
},
"rollout_surge": true,
"retiring_instances": [
{
"requested_at": "2023-11-07T05:31:56Z",
"drain_seconds": 1815,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_acknowledged_at": "2023-11-07T05:31:56Z",
"drain_until": "2023-11-07T05:31:56Z"
}
],
"id": "8f2a1c3d-4e5b-4a6f-9c0d-1e2f3a4b5c6d",
"crn": "crn:compute:sa-saopaulo-1:my-account:instance-pool/web-pool",
"name": "web-asg",
"description": "Front-end autoscaling group",
"desired_count": 2,
"min_count": 1,
"max_count": 3,
"live_count": 2,
"member_count": 2,
"refresh_in_progress": false,
"stale_instance_count": 0,
"status": "active",
"managed_by": "customer",
"tags": {
"environment": "production",
"team": "backend"
},
"template": {
"security_groups": [
{
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
}
],
"floating_ip_assignment": "none",
"iam_role": {
"id": "550e8400-e29b-41d4-a716-446655440005",
"crn": "crn:iam:::role/550e8400-e29b-41d4-a716-446655440005",
"name": "instance-role"
},
"flavor": {
"id": "550e8400-e29b-41d4-a716-446655440003",
"crn": "crn:compute:sa-saopaulo-1:platform:flavor/s1.small",
"name": "s1.small"
},
"image": {
"id": "550e8400-e29b-41d4-a716-446655440004",
"crn": "crn:compute:sa-saopaulo-1:platform:image/ubuntu/architecture/amd64/version/24.04",
"name": "ubuntu"
},
"addresses": [
{
"family": "ipv4",
"address": "<string>"
}
],
"user_data": "aSDinaTvuI8gbWludGxpZnk=",
"metadata": {
"environment": "production",
"team": "backend"
},
"tags": {
"environment": "production",
"team": "backend"
},
"volumes": [
{
"size_gb": 20,
"boot": false,
"volume_type": "nvme",
"performance": {
"iops": 6000,
"throughput_mib_s": 250
},
"mount_path": "/data",
"fstype": "ext4",
"delete_on_termination": true
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "ACCESS_DENIED",
"message": "You don't have permission to perform this action",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "CONFLICT",
"message": "Resource with this name already exists",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}compute:UpdateInstancePool. See COMPUTE permissions for the full list, what each one covers, and an example policy.Authorizations
An OAuth 2.0 bearer token, sent as Authorization: Bearer <token>.
This is the recommended way to authenticate.
Get one by exchanging a service account's access key pair at
POST /v1/oauth/token with grant_type=client_credentials. It is the
standard client-credentials grant, so any OAuth-aware library will
obtain and refresh it for you.
curl -s -u "$KEY_ID:$SECRET" -d grant_type=client_credentials \
https://iam.basaltic.sh/v1/oauth/token
Tokens last an hour by default. The same access key pair is separately your AWS SigV4 credential for the S3-compatible object endpoint, which speaks nothing else.
Path Parameters
Response
The roll was accepted; the pool is returned as it stands.
A launch template plus a desired count. Creating a pool spawns desired_count instances; a reconciler converges member_count toward desired_count as it changes. member_count is how many members the pool holds; live_count is how many of them are running.
A pool carries two tag sets and they answer different questions. tags labels the pool resource — that is what an IAM condition reads as basalt:ResourceTag/<key> and what a cost report groups by, and it reaches no instance. template.tags is the set stamped on every replica the pool launches.
Show child attributes
Show child attributes

