Skip to Content
ReferenceAPI referenceCrowdSec

Count the scenarios among recent CrowdSec alerts

GET
/api/v1/crowdsec/alerts/scenarios

Returns the scenarios among the newest 500 alerts that match since and kind, with how many of those alerts each one has, the most first. Scenarios with the same count sort by name. Answers 403 when the server has no CrowdSec machine credentials, CROWDSEC_MACHINE_ID and CROWDSEC_MACHINE_PASSWORD.

Authorization

cookiesession<token>

Session cookie authentication.

Query Parameters

since?|

Keep only alerts that started within this long before now, as a Go duration of hours, minutes and seconds such as 24h or 1h30m.

kind?|

Keep only alerts of one kind, crowdsec, waf, bot-detection, capi, papi or cscli. bot keeps everything the AppSec bot challenge produces. Needs CrowdSec 1.7 or newer, and an older LAPI gets a 400.

Response Body

Request fulfilled, document follows

application/json
  1. response
[index: integer]?

The number of decisions or alerts from one scenario.

Example Request
curl -X GET 'https://geometrikks.example.com/api/v1/crowdsec/alerts/scenarios'
Example Response
[  {    "count": 0,    "scenario": "string"  }]