Skip to main content

Integrations

info
  • We're assuming your API key is set in the environment variable $KEY with the necessary permissions.

Creating integrationโ€‹

SH
curl -i -H "x-api-key: ${KEY}" -X POST -H "Content-Type: application/json" \
https://admin.api.crowdsec.net/v1/integrations \
-d '{ "name": "test_integration_1", "description": "my test integration", "entity_type": "firewall_integration", "output_format": "plain_text" }'
warning

The username and password will only be displayed at creation time, be sure to write them down. If you lose them, you can always regenerate them with the update method.

answer on success
JSON
{
"id": "INTEGRATIONID12345",
"name": "test_integration_1",
"organization_id": "MY-ORG-ID-abcdef1234",
"description": "my test integration",
"created_at": "2024-06-07T14:00:31.645929Z",
"updated_at": "2024-06-07T14:00:31.645943Z",
"entity_type": "firewall_integration",
"output_format": "plain_text",
"last_pull": null,
"blocklists": [],
"endpoint": "https://admin.api.crowdsec.net/v1/integrations/INTEGRATIONID12345/content",
"stats": {
"count": 0
},
"credentials": {
"username": "<login>",
"password": "<password>"
}
}

View integration contentโ€‹

View integration content allows you to preview the list of IPs that are returned to your firewall (or whatever is going to consume the integration).

SH
curl -i -u '<login>:<password>' https://admin.api.crowdsec.net/v1/integrations/INTEGRATIONID12345/content
CrowdSec Docs
We use cookies

This site uses cookies to help us improve your experience. You can accept or decline below.