Get Database Metrics by ID
curl --request GET \
--url https://api.vertracloud.app/v1/databases/{id}/metricsimport requests
url = "https://api.vertracloud.app/v1/databases/{id}/metrics"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vertracloud.app/v1/databases/{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.vertracloud.app/v1/databases/{id}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.vertracloud.app/v1/databases/{id}/metrics"
req, _ := http.NewRequest("GET", url, nil)
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.vertracloud.app/v1/databases/{id}/metrics")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/databases/{id}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"response": [
{
"cpu": "0.50%",
"ram": "128.00 MB",
"storage": "256.00 MB",
"network": [1024, 2048],
"date": "2026-03-14T19:58:00Z"
},
{
"cpu": "0.75%",
"ram": "130.00 MB",
"storage": "256.00 MB",
"network": [2048, 4096],
"date": "2026-03-14T20:00:00Z"
}
]
}
Databases
Get Database Metrics by ID
Retrieves metrics for a specific database by its ID over the last 24 hours.
GET
/
v1
/
databases
/
{id}
/
metrics
Get Database Metrics by ID
curl --request GET \
--url https://api.vertracloud.app/v1/databases/{id}/metricsimport requests
url = "https://api.vertracloud.app/v1/databases/{id}/metrics"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vertracloud.app/v1/databases/{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.vertracloud.app/v1/databases/{id}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.vertracloud.app/v1/databases/{id}/metrics"
req, _ := http.NewRequest("GET", url, nil)
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.vertracloud.app/v1/databases/{id}/metrics")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/databases/{id}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"response": [
{
"cpu": "0.50%",
"ram": "128.00 MB",
"storage": "256.00 MB",
"network": [1024, 2048],
"date": "2026-03-14T19:58:00Z"
},
{
"cpu": "0.75%",
"ram": "130.00 MB",
"storage": "256.00 MB",
"network": [2048, 4096],
"date": "2026-03-14T20:00:00Z"
}
]
}
string
required
The ID of the database to retrieve metrics for. If the database belongs to a workspace, pass its ID in the
workspace_id query parameter.string
If the database belongs to a workspace, the workspace’s ID. Required for workspace members acting on a database they don’t own.
Response
array
An array of metric objects for the database over the last 24 hours.
Show Toggle object
Show Toggle object
string
The CPU usage of the database container (e.g., “0.00%”).
string
The RAM usage of the database container in MB (e.g., “0.00 MB”).
string
The storage usage of the database container in MB (e.g., “0.00 MB”).
array
An array containing the network inbound and outbound traffic in bytes [in, out].
string
The timestamp when the metric was recorded.
{
"response": [
{
"cpu": "0.50%",
"ram": "128.00 MB",
"storage": "256.00 MB",
"network": [1024, 2048],
"date": "2026-03-14T19:58:00Z"
},
{
"cpu": "0.75%",
"ram": "130.00 MB",
"storage": "256.00 MB",
"network": [2048, 4096],
"date": "2026-03-14T20:00:00Z"
}
]
}
Error Responses
string
The error code indicating the reason for failure. Possible values:
UNAUTHORIZED: The user is not authenticated or lacks sufficient permissions.FORBIDDEN: The user does not have permission to access the database.DATABASE_NOT_FOUND: The specified database does not exist.
string
A descriptive message providing additional details about the error.
{
"code": "UNAUTHORIZED"
}
{
"code": "DATABASE_NOT_FOUND"
}
{
"code": "FORBIDDEN"
}