Skip to content

Response-time samples for a whole page of monitors, keyed by monitor id.

POST
/monitors/recent-checks
curl --request POST \
--url https://api.siteqwality.com/monitors/recent-checks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "monitor_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'

The dashboard drew one sparkline per row and fetched each one with its own GET /http/job/{id}/recent. A fifty-row page was fifty requests, roughly half of them heartbeat and browser-check ids sent to an HTTP-job endpoint that could only ever answer with an empty array, each one having taken a reader connection to say so. At five hundred monitors that is a self-inflicted outage.

Ids that are not HTTP monitors, or that belong to another account, are absent from the response rather than present-and-empty. The caller reads the map by id and treats a missing key as “no series”, which is exactly what a heartbeat or a browser check has.

Media type application/json

Request body for the batched sparkline endpoint.

object
monitor_ids
required

Monitor ids to fetch response-time samples for. Ids that are not HTTP monitors, or that belong to another account, are simply absent from the response.

Array<string>
Example generated
{
"monitor_ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

Response-time samples keyed by monitor id

Too many monitor ids in one request

Missing or invalid authentication

Internal server error