GET
/
project
/
{project_id}
/
location
/
{location}
/
postgres
/
{postgres_database_reference}
/
metrics
curl --request GET \
  --url https://api.ubicloud.com/project/{project_id}/location/{location}/postgres/{postgres_database_reference}/metrics \
  --header 'Authorization: Bearer <token>'
{
  "metrics": [
    {
      "key": "cpu_usage",
      "name": "CPU Usage",
      "description": "CPU usage of the Postgres database",
      "unit": "percent",
      "series": [
        {
          "labels": {
            "server": "pv9z3a26qkyy4qcxrhzg5f1bs8"
          },
          "values": [
            [
              123
            ]
          ]
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

location
string
required

The Ubicloud location/region

Example:

"eu-central-h1"

postgres_database_reference
string
required

Postgres database ID or name

project_id
string
required

ID of the project

Example:

"pjkkmx0f2vke4h36nk9cm8v8q0"

Query Parameters

start
string
default:now-30m

Start time for metrics query (rfc3339 format)

Example:

"2025-05-12T11:57:24+00:00"

end
string
default:now

End time for metrics query (rfc3339 format)

Example:

"2025-05-12T11:27:24+00:00"

key
string

Key of the specific metric to retrieve

Example:

"cpu_usage"

Response

200
application/json

Metrics data for a Postgres Database

The response is of type object.