---
title: "Database Monitoring: statements as reported by the databases themselves"
method: GET
path: "/api/{org_id}/db_monitoring/server_queries"
tags: ["Traces"]
---

# Database Monitoring: statements as reported by the databases themselves

`GET /api/{org_id}/db_monitoring/server_queries`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/db_monitoring/server_queries`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/db_monitoring/server_queries/get.ts> (a function with typed inputs; its response is checked against the schema)

Per-statement counters (pg_stat_statements / events_statements_summary_by_digest) aggregated over the window, ranked by call count. Server-vantage: measured inside the database across every client, disjoint from the trace-derived /queries list. Reports a MEAN and never a percentile.

## Path parameters

- `org_id` string, required

## Query parameters

- `start_time` integer
- `end_time` integer
- `stream` string
- `system` string
- `instance` string
- `database` string
- `fingerprint` string
- `limit` integer

## Response `200`

Success

- object

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
