curl -L -X GET 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/stats' \
-H 'Authorization: Bearer TOKEN'
{
"top_queries": [
{
"query": "SELECT COUNT(*), CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*) > 5;",
"rows_read": 123,
"rows_written": 4567
}
]
}{
"error": "could not find database with name [databaseName]: record not found"
}Databases
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
curl -L -X GET 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/stats' \
-H 'Authorization: Bearer TOKEN'
{
"top_queries": [
{
"query": "SELECT COUNT(*), CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*) > 5;",
"rows_read": 123,
"rows_written": 4567
}
]
}{
"error": "could not find database with name [databaseName]: record not found"
}curl -L -X GET 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/stats' \
-H 'Authorization: Bearer TOKEN'
Authorizations
Path Parameters
Was this page helpful?