curl --request POST \
--url https://api.instacloud.com/projects/{projectId}/database/restart \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instacloud.com/projects/{projectId}/database/restart"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instacloud.com/projects/{projectId}/database/restart', 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/restart",
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://api.instacloud.com/projects/{projectId}/database/restart"
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://api.instacloud.com/projects/{projectId}/database/restart")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/database/restart")
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{
"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
},
"pending": true,
"publicAccess": true,
"privateAccess": true,
"privateConnString": "<string>",
"privateLane": {
"enabled": true,
"console": true
},
"warnings": [
"<string>"
]
}{
"status": "approval_required",
"approvalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "<string>",
"actions": [
"<string>"
],
"message": "<string>",
"url": "<string>",
"nextActions": [
{
"op": "<string>",
"reason": "<string>",
"args": {},
"gated": true
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Restart database
Token scope: account · org · project — read-only tokens refused (not a GET).
Restart the postgres server (insta-db only) so settings written with ALTER SYSTEM that need a restart (wal_level, max_wal_senders, max_replication_slots, …) take effect. Connections drop while it restarts. Waits for the restart to finish. pending: true means it was still in progress when the wait ran out — GET …/database/instance reads running throughout, so confirm with SHOW <setting> instead. A suspended database stays suspended — its next connection starts it with the new settings. Gated — deploy.
curl --request POST \
--url https://api.instacloud.com/projects/{projectId}/database/restart \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instacloud.com/projects/{projectId}/database/restart"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instacloud.com/projects/{projectId}/database/restart', 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/restart",
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://api.instacloud.com/projects/{projectId}/database/restart"
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://api.instacloud.com/projects/{projectId}/database/restart")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/database/restart")
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{
"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
},
"pending": true,
"publicAccess": true,
"privateAccess": true,
"privateConnString": "<string>",
"privateLane": {
"enabled": true,
"console": true
},
"warnings": [
"<string>"
]
}{
"status": "approval_required",
"approvalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "<string>",
"actions": [
"<string>"
],
"message": "<string>",
"url": "<string>",
"nextActions": [
{
"op": "<string>",
"reason": "<string>",
"args": {},
"gated": true
}
]
}{
"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)
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
true when the provider accepted the change asynchronously and it has not been applied yet — the ceiling/volume fields are then the PRE-change values. Re-read (GET) to see the applied state. Absent when the change was applied synchronously.
postgres (insta-db) — false: the public endpoint refuses every connection (SQLSTATE 28000) and the database is not reachable from the internet; only the private network lane connects. Change it with PUT .../services/{serviceId}/access. Absent when the provider does not report it.
postgres (insta-db) — true: the database has a private network connection string (privateConnString, and DATABASE_PRIVATE_URL in the service credentials) for compute services on the insta-compute provider. Change it with PATCH .../database/settings {privateAccess}. Absent when the provider does not report it.
the connection string over the private network lane, WITHOUT the password (the full URL is DATABASE_PRIVATE_URL in the service credentials). Present only while privateAccess is on.
GET .../database/instance only — this deployment's private-lane switches, so a UI can render the toggles without a probing write
Show child attributes
Show child attributes
what this change will break and how to fix it (e.g. compute services bound to DATABASE_PRIVATE_URL when private access is turned off). Advisory: the change was applied.