Get database insight
curl --request GET \
--url https://api.instacloud.com/projects/{projectId}/database/insight \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instacloud.com/projects/{projectId}/database/insight"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instacloud.com/projects/{projectId}/database/insight', 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/insight",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/insight"
req, _ := http.NewRequest("GET", 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.get("https://api.instacloud.com/projects/{projectId}/database/insight")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/database/insight")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"collected": true,
"sizes": {
"databaseBytes": 123,
"tablesBytes": 123,
"indexesBytes": 123,
"walBytes": 123
},
"tables": [
{
"name": "<string>",
"liveRows": 123,
"dataBytes": 123,
"indexBytes": 123,
"seqScans": 123,
"idxScans": 123
}
],
"vacuum": {
"totalDeadRows": 123,
"tables": [
{
"name": "<string>",
"deadRows": 123,
"deadPct": 123,
"xidAge": 123,
"lastVacuum": "<string>"
}
]
},
"unusedIndexes": [
{
"name": "<string>",
"table": "<string>",
"sizeBytes": 123,
"scans": 123
}
],
"note": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Observability
Get database insight
Token scope: account · org · project — read-only tokens allowed.
Deep database health: size breakdown, per-table stats, vacuum health, unused indexes. Read-only; insta-db-backed services answer without waking a suspended instance.
GET
/
projects
/
{projectId}
/
database
/
insight
Get database insight
curl --request GET \
--url https://api.instacloud.com/projects/{projectId}/database/insight \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instacloud.com/projects/{projectId}/database/insight"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instacloud.com/projects/{projectId}/database/insight', 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/insight",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/insight"
req, _ := http.NewRequest("GET", 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.get("https://api.instacloud.com/projects/{projectId}/database/insight")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/database/insight")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"collected": true,
"sizes": {
"databaseBytes": 123,
"tablesBytes": 123,
"indexesBytes": 123,
"walBytes": 123
},
"tables": [
{
"name": "<string>",
"liveRows": 123,
"dataBytes": 123,
"indexBytes": 123,
"seqScans": 123,
"idxScans": 123
}
],
"vacuum": {
"totalDeadRows": 123,
"tables": [
{
"name": "<string>",
"deadRows": 123,
"deadPct": 123,
"xidAge": 123,
"lastVacuum": "<string>"
}
]
},
"unusedIndexes": [
{
"name": "<string>",
"table": "<string>",
"sizeBytes": 123,
"scans": 123
}
],
"note": "<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
false = suspended instance or provider without the capability; sections are structural zeros
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
never-scanned indexes, excluding constraint-backing ones
Show child attributes
Show child attributes
present when the provider serves no insight at all