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
Request
- Base URLhttps://api.turso.tech
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
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
}
]
}Changes
No recorded changes to this operation across all 3 revisions of this API.