curl --request PATCH \
--url https://api.instacloud.com/projects/{projectId}/database/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connectionPooling": true,
"deletionProtection": true,
"scaleToZero": true,
"cpu": "<string>",
"memory": "<string>",
"idleTimeout": 1,
"volumeSize": "<string>",
"storageSize": "<string>"
}
'import requests
url = "https://api.instacloud.com/projects/{projectId}/database/settings"
payload = {
"connectionPooling": True,
"deletionProtection": True,
"scaleToZero": True,
"cpu": "<string>",
"memory": "<string>",
"idleTimeout": 1,
"volumeSize": "<string>",
"storageSize": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connectionPooling: true,
deletionProtection: true,
scaleToZero: true,
cpu: '<string>',
memory: '<string>',
idleTimeout: 1,
volumeSize: '<string>',
storageSize: '<string>'
})
};
fetch('https://api.instacloud.com/projects/{projectId}/database/settings', 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://api.instacloud.com/projects/{projectId}/database/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'connectionPooling' => true,
'deletionProtection' => true,
'scaleToZero' => true,
'cpu' => '<string>',
'memory' => '<string>',
'idleTimeout' => 1,
'volumeSize' => '<string>',
'storageSize' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.instacloud.com/projects/{projectId}/database/settings"
payload := strings.NewReader("{\n \"connectionPooling\": true,\n \"deletionProtection\": true,\n \"scaleToZero\": true,\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\",\n \"idleTimeout\": 1,\n \"volumeSize\": \"<string>\",\n \"storageSize\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.instacloud.com/projects/{projectId}/database/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connectionPooling\": true,\n \"deletionProtection\": true,\n \"scaleToZero\": true,\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\",\n \"idleTimeout\": 1,\n \"volumeSize\": \"<string>\",\n \"storageSize\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/database/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connectionPooling\": true,\n \"deletionProtection\": true,\n \"scaleToZero\": true,\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\",\n \"idleTimeout\": 1,\n \"volumeSize\": \"<string>\",\n \"storageSize\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"state": "<string>",
"routeKey": "<string>",
"host": "<string>",
"port": 123,
"connectionPooling": true,
"deletionProtection": true,
"scaleToZero": true,
"idleTimeoutSecs": 123,
"volumeSize": "10Gi",
"volumeGib": 123,
"storageSize": "<string>",
"storageGiB": 123,
"enabledExtensions": [
"<string>"
],
"cpuMilli": 123,
"memoryMib": 123,
"cap": {
"cpuMilli": 123,
"memoryMib": 123,
"volumeGib": 123
}
}{
"status": "<string>",
"approvalId": "<string>",
"action": "<string>",
"actions": [
"<string>"
],
"message": "<string>",
"url": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Update database settings
Token scope: account · org · project — read-only tokens refused (not a GET).
Update postgres settings: connection pooling, scale-to-zero, idle timeout, storage, and deletion protection.
curl --request PATCH \
--url https://api.instacloud.com/projects/{projectId}/database/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connectionPooling": true,
"deletionProtection": true,
"scaleToZero": true,
"cpu": "<string>",
"memory": "<string>",
"idleTimeout": 1,
"volumeSize": "<string>",
"storageSize": "<string>"
}
'import requests
url = "https://api.instacloud.com/projects/{projectId}/database/settings"
payload = {
"connectionPooling": True,
"deletionProtection": True,
"scaleToZero": True,
"cpu": "<string>",
"memory": "<string>",
"idleTimeout": 1,
"volumeSize": "<string>",
"storageSize": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connectionPooling: true,
deletionProtection: true,
scaleToZero: true,
cpu: '<string>',
memory: '<string>',
idleTimeout: 1,
volumeSize: '<string>',
storageSize: '<string>'
})
};
fetch('https://api.instacloud.com/projects/{projectId}/database/settings', 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://api.instacloud.com/projects/{projectId}/database/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'connectionPooling' => true,
'deletionProtection' => true,
'scaleToZero' => true,
'cpu' => '<string>',
'memory' => '<string>',
'idleTimeout' => 1,
'volumeSize' => '<string>',
'storageSize' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.instacloud.com/projects/{projectId}/database/settings"
payload := strings.NewReader("{\n \"connectionPooling\": true,\n \"deletionProtection\": true,\n \"scaleToZero\": true,\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\",\n \"idleTimeout\": 1,\n \"volumeSize\": \"<string>\",\n \"storageSize\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.instacloud.com/projects/{projectId}/database/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connectionPooling\": true,\n \"deletionProtection\": true,\n \"scaleToZero\": true,\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\",\n \"idleTimeout\": 1,\n \"volumeSize\": \"<string>\",\n \"storageSize\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/database/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connectionPooling\": true,\n \"deletionProtection\": true,\n \"scaleToZero\": true,\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\",\n \"idleTimeout\": 1,\n \"volumeSize\": \"<string>\",\n \"storageSize\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"state": "<string>",
"routeKey": "<string>",
"host": "<string>",
"port": 123,
"connectionPooling": true,
"deletionProtection": true,
"scaleToZero": true,
"idleTimeoutSecs": 123,
"volumeSize": "10Gi",
"volumeGib": 123,
"storageSize": "<string>",
"storageGiB": 123,
"enabledExtensions": [
"<string>"
],
"cpuMilli": 123,
"memoryMib": 123,
"cap": {
"cpuMilli": 123,
"memoryMib": 123,
"volumeGib": 123
}
}{
"status": "<string>",
"approvalId": "<string>",
"action": "<string>",
"actions": [
"<string>"
],
"message": "<string>",
"url": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Session access JWT or an API token (insta_<prefix>_<secret>).
Path Parameters
Query Parameters
branch name (default branch if omitted)
postgres service name (default: the sole postgres service)
Body
enable provider-managed PgBouncer/connection pooling
enable or disable scale-to-zero
resource ceiling — vCPU as a provider quantity ('2', '4', '2500m'). PAID PLANS: the ceiling is the tier lever. Moves both directions (insta-db only)
resource ceiling — memory as a provider quantity ('4Gi', '8Gi'). PAID PLANS. Moves both directions (insta-db only)
scale-to-zero idle timeout in seconds
x >= 0the volume (block disk) size cap as whole Gi ('10Gi'). PAID PLANS: the ceiling is the tier lever. Grow-only — a provisioned disk cannot shrink (insta-db only)
DEPRECATED alias of volumeSize — dropped next release
Response
Default Response
the service's volume (block disk) size
"10Gi"
DEPRECATED alias of volumeSize — dropped next release
DEPRECATED alias of volumeGib — dropped next release
current cpu ceiling in millicores (2000 = 2 vCPU)
current memory ceiling in MiB
this plan's maximum for the ceilings — render sliders with their plan-limit markers. These are the caller's own tier caps and they move with the plan (and with env overrides per deployment), so read them from THIS field rather than assuming a tier's numbers; the parenthetical example that used to live here said 'pro 4 vCPU/4Gi/10Gi' and was stale on all three by the time anyone noticed.
Show child attributes
Show child attributes