Skip to Content
ReferenceAPI referenceCrowdSec
Next: these pages describe unreleased changes on the develop branch. Read the docs for the current release

Count the active CrowdSec decisions by origin and scenario

GET
/api/v1/crowdsec/stats

Returns how many decisions are active across every origin, blocklists included, with the count per origin, the split into bans, ranges, captchas and other types, how many expire within expiringSoonHours hours and the ten scenarios with the most decisions. The counts come from the decision stream the server polls, so a change can take up to CROWDSEC_STREAM_POLL_INTERVAL seconds to show.

Authorization

cookiesession<token>

Session cookie authentication.

Response Body

Request fulfilled, document follows

application/json
  1. response

Counts of the active CrowdSec decisions across every origin.

byOrigin*array<>

Every origin, the most decisions first.

expiringSoon*integer

Decisions with expiringSoonHours hours or less left.

expiringSoonHours*integer
split*

The active decisions by what they do. Each decision counts once.

topScenarios*array<>

The ten scenarios with the most decisions, the most first.

total*integer
Example Request
curl -X GET 'https://geometrikks.example.com/api/v1/crowdsec/stats'
Example Response200
{  "byOrigin": [    {      "count": 0,      "origin": "string"    }  ],  "expiringSoon": 0,  "expiringSoonHours": 0,  "split": {    "bans": 0,    "captchas": 0,    "other": 0,    "ranges": 0  },  "topScenarios": [    {      "count": 0,      "scenario": "string"    }  ],  "total": 0}