Not able to delete a decision with an API (cookie-token is missing)

Hello there, I’ve been trying to delete the decisions via API, but it seems like I’m missing a cookie-token.
Here’s the output that I get:

{“code”:401,“message”:“cookie token is empty”}

As well as I’ve noticed in the Swagger UI it mentions that “Delete decision for given ban ID (only from cscli)”. So I’m wondering if we’re not able to delete decisions from an HTTP API call?

Thank you.

You can delete via the API, however, you need to pass a JWT token as the header that you get from sending valid credentials to /v1/watchers/login. So the flow is
POST /v1/watchers/login → Set Authorization: Bearer ${jwt} → Send DELETE /v1/decisions/${ID}

For more information the cscli command interacts with crowdsec over the http API. If you need to know where the valid credentials are for your machine the local api is stored /etc/crowdsec/local_api_credentials.yaml

Thank you, much appreciated.