Skip to content

Get Database Metrics

GET
/dbaas/{managed_db_id}/metrics/
curl --request GET \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/dbaas/{managed_db_id}/metrics/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>'

Returns the charts of the database over a time range: for each metric, the points, and the current, average, peak and minimum value. The metrics are cpu_utilization, memory_utilization, storage_utilization, disk_read_iops, disk_write_iops, disk_read_throughput, disk_write_throughput, disk_read_latency, disk_write_latency, network_receive, network_transmit. A metric that cannot be read comes back with an empty series and null stats. markers lists up to 20 of the database’s activity entries inside the range. Works only while the database is Running. Needs the Read permission for DBaaS.

managed_db_id
required
integer

Database ID

project_id
required
integer

Project ID

range
string
Allowed values: 1h 6h 24h 7d 30d

How far back to look. Points are 1 minute apart on 1h, 5 minutes on 6h, 15 minutes on 24h, 1 hour on 7d and 4 hours on 30d. Left out, or any other value, gives the last 24 hours.

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

The metrics

Media typeapplication/json
object
code
integer
message
string
data
object
range

The range as sent; 1d when left out.

string
step_seconds

Seconds between points.

integer
start

Start of the range, Unix time in seconds.

integer
end

End of the range, Unix time in seconds.

integer
generated_at
string
metrics

One entry per metric key, shown here for one of them.

object
cpu_utilization
object
meta
object
label
string
unit

percent, iops, bytes_per_sec or ms.

string
description
string
series

Points as [Unix time in seconds, value], oldest first.

Array<Array<number>>
stats

Rounded to 2 decimal places.

object
current
number
nullable
avg
number
nullable
peak
number
nullable
min
number
nullable
markers
Array<object>
object
ts

Unix time in seconds.

integer
event_type
string
category
string
Allowed values: customer_action system_event
title
string
errors
object

Example

{
"code": 200,
"message": "Success",
"data": {
"range": "1h",
"step_seconds": 60,
"start": 1793006400,
"end": 1793010000,
"generated_at": "2026-10-26T10:20:00+00:00",
"metrics": {
"cpu_utilization": {
"meta": {
"label": "CPU Utilization",
"unit": "percent",
"description": "vCPU usage as a percentage of provisioned cores"
},
"series": [
[
1793009940,
17.9
],
[
1793010000,
18.5
]
],
"stats": {
"current": 18.5,
"avg": 12.31,
"peak": 41.02,
"min": 3.4
}
}
},
"markers": [
{
"ts": 1793008200,
"event_type": "snapshot_created",
"category": "customer_action",
"title": "Snapshot created"
}
]
},
"errors": {}
}

project_id is missing or not a number.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 400,
"message": "Bad Request",
"data": {},
"errors": "Project ID is missing or invalid"
}

The caller lacks the permission the call needs on the project, or the region is not allowed.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 403,
"message": "Forbidden",
"data": {},
"errors": "You don't have permission to access this service. Please verify your policy or project."
}

No database with that ID in the project and region.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 404,
"message": "Bad Request",
"data": {},
"errors": "Invalid request! Database Not Found"
}

The database is not Running.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 412,
"message": "Precondition Failed",
"data": {},
"errors": "Database NOT in RUNNING state. Please try again later."
}