Skip to main content
GET
Get Slow Queries

Authorizations

Authorization
string
header
required

Mixpeek API key, sent as Authorization: Bearer mxp_sk_.... Create one in Studio under Settings → API Keys, or with an admin key via POST /v1/organizations/users/{user_email}/api-keys. A missing header returns 403; an invalid or revoked key returns 401.

X-Namespace
string
header
required

Namespace id (ns_...), not the namespace name. This scopes the request rather than authenticating it, and it is required on every operation marked x-mixpeek-namespace-scoped.

Query Parameters

days
integer
default:30

Days of history to analyze

Required range: 1 <= x <= 90
latency_threshold_ms
number
default:500

Latency threshold in ms

Required range: 100 <= x <= 10000
limit
integer
default:100

Maximum queries to return

Required range: 1 <= x <= 500

Response

Successful Response

Response for slow queries endpoint.

namespace_id
string
required

Namespace ID analyzed

time_range_days
integer
required

Number of days analyzed

latency_threshold_ms
number
required

Latency threshold used

slow_queries
SlowQueryDetails · object[]
required

Slow query details, newest-slowest first, capped at limit

total_slow_queries
integer
required

Slow queries in the whole window, NOT the length of slow_queries. Falls back to the returned count when total_is_exact is false.

returned_count
integer
required

How many entries slow_queries actually contains

total_is_exact
boolean
required

False when the total could not be counted (analytics backend unreachable) and total_slow_queries is a floor, not a total.