v1

latestOpenAPI 3.0.1MIT2026-07-134925112.4 KB

Retrieve Database Stats

Fetch the top queries of a database, including the count of rows read and written.

get/v1/organizations/{organizationSlug}/databases/{databaseName}/stats

Path parameters

organizationSlugstring required

The slug of the organization or user account.

databaseNamestring required

The name of the database.

Response

Successful response

Example response

{
  "top_queries": [
    {
      "query": "SELECT COUNT(*), CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*) > 5;",
      "rows_read": 123,
      "rows_written": 4567
    }
  ]
}