Get metrics
curl --request GET \
--url https://api.rafftechnologies.com/api/v1/databases/{database_id}/metrics \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rafftechnologies.com/api/v1/databases/{database_id}/metrics"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rafftechnologies.com/api/v1/databases/{database_id}/metrics', 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.rafftechnologies.com/api/v1/databases/{database_id}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.rafftechnologies.com/api/v1/databases/{database_id}/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.rafftechnologies.com/api/v1/databases/{database_id}/metrics")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/databases/{database_id}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"cpu_used_millicores": 123,
"cpu_capacity_millicores": 123,
"mem_used_bytes": 123,
"mem_capacity_bytes": 123,
"storage_used_bytes": 123,
"storage_capacity_bytes": 123,
"connections_active": 123,
"connections_max": 123,
"replication_lag_bytes": 123,
"archive_lag_bytes": 123,
"metrics_updated_at": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Observability
Get metrics
Latest usage snapshot: CPU, memory, storage, connections, and replication lag. Metrics refresh about every 60 seconds; zero values mean not measured yet.
GET
/
api
/
v1
/
databases
/
{database_id}
/
metrics
Get metrics
curl --request GET \
--url https://api.rafftechnologies.com/api/v1/databases/{database_id}/metrics \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rafftechnologies.com/api/v1/databases/{database_id}/metrics"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rafftechnologies.com/api/v1/databases/{database_id}/metrics', 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.rafftechnologies.com/api/v1/databases/{database_id}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.rafftechnologies.com/api/v1/databases/{database_id}/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.rafftechnologies.com/api/v1/databases/{database_id}/metrics")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/databases/{database_id}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"cpu_used_millicores": 123,
"cpu_capacity_millicores": 123,
"mem_used_bytes": 123,
"mem_capacity_bytes": 123,
"storage_used_bytes": 123,
"storage_capacity_bytes": 123,
"connections_active": 123,
"connections_max": 123,
"replication_lag_bytes": 123,
"archive_lag_bytes": 123,
"metrics_updated_at": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key for authentication. Each key is bound to a specific account.
Path Parameters
Database ID (UUID) or short id (the database_id field, e.g. a1b2c3d4)
Response
Latest metrics snapshot
Latest usage snapshot, refreshed about every 60 seconds. Zero values mean not measured yet.
CPU in use, millicores
CPU capacity, millicores
Memory in use, bytes
Memory capacity, bytes
Storage in use, bytes
Storage capacity, bytes
Active client connections
Connection limit
Standby/replica lag in bytes (0 without HA or replicas)
WAL archiving lag in bytes (PostgreSQL)
When this snapshot was taken, RFC 3339 (empty before the first sample)
Last modified on October 5, 2026