Skip to main content
Version: v1

/metrics API

The metrics API allows you to retrieve an array of session statistics and is only available for dedicated and self-hosted accounts. This API is different to the pressure API since the metrics API returns a collection of all the metrics data with one week of history whereas the pressure API only returns one object (the current metrics).

Check out the metrics API schema defined in our Swagger page.

Gathering metrics array from your workers

To see statistics regarding your workers, simply issue a GET request to /metrics:

curl -X GET \
https://chrome.browserless.io/metrics?token=MY_API_TOKEN
warning

Remember that running this in the browser will expose your API key!

Running this cURL request will result in an output like:

[
{
"date": 0,
"successful": 0,
"queued": 0,
"rejected": 0,
"unhealthy": 0,
"memory": 0,
"cpu": 0,
"timedout": 0,
"totalTime": 0,
"meanTime": 0,
"maxTime": 0,
"minTime": 0,
"maxConcurrent": 0,
"sessionTimes": [0]
}
]

/metrics/all

This route will output a similar payload, but with the total stats of all sessions.