Skip to main content

Integrations

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

Creating integration

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
{
"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).

curl -i -u '<login>:<password>' https://admin.api.crowdsec.net/v1/integrations/INTEGRATIONID12345/content