Get MySQL slow queries for an environment
GET
/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/slow-queries
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/example/applications/example/environments/example/slow-queries?view=summary&limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://dashboard.quantcdn.io/api/v3/organizations/example/applications/example/environments/example/slow-queries?view=summary&limit=50' \ --header 'Authorization: Bearer <token>'Queries over 1 second from the environment’s own database user. summary groups by query shape with literals replaced by ?. enabled=false means the slow query export is not turned on for this database.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organisation
required
string
application
required
string
environment
required
string
Query Parameters
Section titled “Query Parameters”startTime
string
ISO 8601 or Unix epoch ms. Default: 24 hours before endTime.
endTime
string
ISO 8601 or Unix epoch ms. Default: now. Window max 30 days.
view
string
limit
integer
Entries: 1-500; summary: 1-100 shapes
Responses
Section titled “Responses”Slow queries, or enabled=false
Media typeapplication/json
object
Examplegenerated
{}No MySQL database, or no database user for the environment
Query took too long; use a shorter time range
