Note: These docs cover v1 of Browserless, which is used on our shared cloud. For our v2 docs, pleaseclick here

/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

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.

Ready to try benefits of Browserless?