curl --request GET \
--url https://api.ubicloud.com/project/{project_id}/location/{location}/postgres/{postgres_database_reference}/metrics \
--header 'Authorization: Bearer <token>'{
"metrics": [
{
"name": "CPU Usage",
"unit": "percent",
"series": [
{
"labels": {
"server": "pv9z3a26qkyy4qcxrhzg5f1bs8"
},
"values": [
[
123
]
]
}
],
"key": "cpu_usage",
"description": "CPU usage of the Postgres database"
}
]
}curl --request GET \
--url https://api.ubicloud.com/project/{project_id}/location/{location}/postgres/{postgres_database_reference}/metrics \
--header 'Authorization: Bearer <token>'{
"metrics": [
{
"name": "CPU Usage",
"unit": "percent",
"series": [
{
"labels": {
"server": "pv9z3a26qkyy4qcxrhzg5f1bs8"
},
"values": [
[
123
]
]
}
],
"key": "cpu_usage",
"description": "CPU usage of the Postgres database"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The Ubicloud location/region
"eu-central-h1"
Postgres database ID or name Resource ID or name
ID of the project
"pjkkmx0f2vke4h36nk9cm8v8q0"
Start time for metrics query (rfc3339 format)
"2025-05-12T11:57:24+00:00"
End time for metrics query (rfc3339 format)
"2025-05-12T11:27:24+00:00"
Key of the specific metric to retrieve
"cpu_usage"
Metrics data for a Postgres Database
Show child attributes
Name of the metric
"CPU Usage"
Unit of measurement for the metric
"percent"
Show child attributes
Array of timestamp-value pairs
2 elementsUnix timestamp
Key of the metric
"cpu_usage"
Description of the metric
"CPU usage of the Postgres database"