Database endpoints
Read query statistics
Read query counts, latency, row counts and cache hits.
GET /v1/tenants/{tenant}/query-stats
- Request query statisticsRead the process's observed query summary.
- Inspect each fingerprintCompare calls, latency, row counts and cache hits.
- Check the collection startUse since_unix to understand the covered history.
Before you start
Use your database bearer token.
Path parameters
| Field | Type | Required |
|---|---|---|
tenant | string | Required |
Headers
| Field | Type | Required | Description |
|---|---|---|---|
x-oc-db-user | string | Optional | Acting database user (role, grant and row-policy checks). Send with x-oc-db-key. |
x-oc-db-key | string | Optional | API key of the x-oc-db-user user. Returns per-fingerprint statistics for the tenant's read queries (call count, latency percentiles, average rows and cache-hit rate), collected in memory since the server last started. |
Read the result
since_unix gives the collection start and fingerprints groups observed query statistics. An empty list means there are no reported fingerprint entries, not proof that every query succeeded.
Response statuses
HTTP status reference
| Status | What to do |
|---|---|
| 200 | OK |
| 400 | Correct the request before retrying. |
| 401 | Check the credential and Authorization header. |
| 402 | Check feature access or available credits. |
| 403 | Check tenant access, roles and permissions. |
| 429 | Honor Retry-After when present; back off. |
| 500 | Check the outcome before retrying a write. |
| 503 | Honor Retry-After when present; check write outcomes. |