Skip to main content

Organization and Metrics

Read the Overview first for authentication, request conventions, and errors.

Get Organization Tenant Information​

GET /api/v1/orgs/{orgSlug}/tenant · Read · Member

Returns the cloud provider, region, plan, and enabled features of the organization.

Response example:

{
"success": true,
"data": {
"id": "tn3ftqihs",
"state": "ready",
"provider": "aws",
"region": "us-east-2",
"planType": "BUSINESS",
"features": {},
"provisionProgressItems": [],
"createdAt": "2026-06-01T02:00:00Z",
"updatedAt": "2026-11-01T02:00:00Z"
}
}

Get Metrics​

GET /api/v1/orgs/{orgSlug}/tenant/metrics/{queryType} · Read · Member

Returns a time series for one metric.

ParameterInTypeRequiredDescription
orgSlugpathstringYesOrganization ID.
queryTypepathstring (enum)YesMetric name. See the table below.
fromquerystringYesStart time, RFC 3339.
toquerystringYesEnd time, RFC 3339. Must be after from.
stepquerystringYesInterval between points, as a duration: 30s, 60s, 5m, 1h.
warehouseNamequerystringNoWarehouse name. Limits QueryStatusCount, QueryStatusCountByCluster, QueryHttpRequestsCount, QueryHttpRequestsCountByCluster, and QueryAcquiredCountByCluster to one warehouse. Other metrics ignore it.
taskIdqueryintegerFor TiDBSync and MySQLSyncData integration task ID.

queryType values:

ValueDescription
SQLQueriesOvertimeQuery count over time.
QueryPerMinuteQueries per minute.
QueryErrorPerMinuteFailed queries per minute.
QueryStatusCountQueries by status.
QueryStatusCountByClusterQueries by status and cluster.
QueryReadWriteRowsRows read and written.
QueryHttpRequestsCountHTTP query requests.
QueryHttpRequestsCountByClusterHTTP query requests by cluster.
QueryAcquiredCountByClusterQueries that got a run slot, by cluster.
SessionConnectionsOpen sessions.
WarehouseStatusWarehouse state over time.
WarehouseRunningClustersRunning clusters per warehouse.
S3ReadWriteBytesTotalBytes read from and written to object storage.
S3RequestPerMinuteObject storage requests per minute.
DataStoreOvertimeStorage size over time.
TiDBSyncSync metrics of a TiDB data integration task. See Get Sync Metrics.
MySQLSyncSync metrics of a MySQL data integration task. See Get Sync Metrics.

Request example:

curl --get 'https://api.databend.com/api/v1/orgs/<organization-id>/tenant/metrics/QueryPerMinute' \
--header 'X-DATABENDCLOUD-TOKEN: <api-token>' \
--data-urlencode 'from=2026-11-09T07:00:00Z' \
--data-urlencode 'to=2026-11-09T08:00:00Z' \
--data-urlencode 'step=60s'

Response example. time values are Unix seconds. A null value means that there is no sample at that time.

{
"success": true,
"data": {
"resultType": "matrix",
"time": [1762671600, 1762671660],
"total": 18,
"series": [
{ "metric": "default", "time": [1762671600, 1762671660], "value": [10, null], "total": 10, "max": 10, "min": 10, "latest": 10 }
]
}
}
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today