Skip to main content

Engines

info
  • We're assuming your API key is set in the environment variable $KEY with the necessary permissions.
  • The engines endpoints require a key with engines scope, otherwise the api returns 403 Forbidden.

An engine exposes the informations related to Security Engines enrolled to your Organization.

Get Enginesโ€‹

info
SH
curl -i -H "x-api-key: ${KEY}" -X GET -H "Content-Type: application/json" \
https://admin.api.crowdsec.net/v1/engines
answer on success
JSON
{
"items": [
{
"id": "string",
"organization_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"entity_type": "engine",
"blocklists": [],
"allowlists": [],
"version": "string",
"enrolled_at": "2019-08-24T14:15:22Z",
"os": {
"name": "string",
"version": "string",
"family": "string"
},
"meta": {},
"last_pull": "2019-08-24T14:15:22Z",
"last_push": "2019-08-24T14:15:22Z",
"last_login": "2019-08-24T14:15:22Z",
"tags": [],
"scenarios": [
"string"
]
}
],
"total": 0,
"page": 1,
"size": 1,
"pages": 0,
"links": {
"first": "/api/v1/users?limit=1&offset1",
"last": "/api/v1/users?limit=1&offset1",
"self": "/api/v1/users?limit=1&offset1",
"next": "/api/v1/users?limit=1&offset1",
"prev": "/api/v1/users?limit=1&offset1"
}
}

Get Engineโ€‹

Retrieve a single Security Engine, using the id returned by Get Engines

SH
curl -i -H "x-api-key: ${KEY}" -X GET -H "Content-Type: application/json" \
https://admin.api.crowdsec.net/v1/engines/${ENGINE_ID}
answer on success
JSON
{
"id": "string",
"organization_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"entity_type": "engine",
"blocklists": [
{
"id": "string",
"remediation": "string"
}
],
"allowlists": [
{
"id": "string"
}
],
"version": "string",
"enrolled_at": "2019-08-24T14:15:22Z",
"os": {
"name": "string",
"version": "string",
"family": "string"
},
"meta": {},
"last_pull": "2019-08-24T14:15:22Z",
"last_push": "2019-08-24T14:15:22Z",
"last_login": "2019-08-24T14:15:22Z",
"last_ip": "string",
"tags": [
"string"
],
"scenarios": [
"string"
]
}

Associate Tags With Engineโ€‹

Associate one or more tags with a Security Engine

SH
curl -i -H "x-api-key: ${KEY}" -X POST -H "Content-Type: application/json" \
https://admin.api.crowdsec.net/v1/engines/${ENGINE_ID}/tags \
-d '{ "tags": ["production", "eu-west"] }'
answer on success (201 Created)
JSON
{
"modified_count": 1,
"errors": {}
}

Disassociate Tag From Engineโ€‹

Remove a tag from a Security Engine. The tag itself is not deleted, only its association with the engine.

SH
curl -i -H "x-api-key: ${KEY}" -X DELETE -H "Content-Type: application/json" \
https://admin.api.crowdsec.net/v1/engines/${ENGINE_ID}/tags/production
info

On success the API returns 204 No Content with an empty body.

Get Engine Log Processorsโ€‹

List the Log Processors attached to a Security Engine

SH
curl -i -H "x-api-key: ${KEY}" -X GET -H "Content-Type: application/json" \
"https://admin.api.crowdsec.net/v1/engines/${ENGINE_ID}/log_processors?page=1&size=50"
answer on success
JSON
{
"items": [
{
"id": "string",
"organization_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"entity_type": "log_processor",
"name": "string",
"version": "string",
"last_push": "2019-08-24T14:15:22Z",
"last_update": "2019-08-24T14:15:22Z",
"last_heartbeat": "2019-08-24T14:15:22Z",
"feature_flags": [
"string"
],
"hub_items": {
"scenarios": [
{
"name": "string",
"version": "string",
"status": "string"
}
],
"parsers": [],
"postoverflows": [],
"appsec-configs": [],
"appsec-rules": [],
"collections": [],
"contexts": []
},
"os": {
"name": "string",
"version": "string",
"family": "string"
},
"datasources": {}
}
],
"total": 0,
"page": 1,
"size": 1,
"pages": 0,
"links": {
"first": "/api/v1/users?limit=1&offset1",
"last": "/api/v1/users?limit=1&offset1",
"self": "/api/v1/users?limit=1&offset1",
"next": "/api/v1/users?limit=1&offset1",
"prev": "/api/v1/users?limit=1&offset1"
}
}

Get Engine Remediation Componentsโ€‹

List the Remediation Components (bouncers) attached to a Security Engine

SH
curl -i -H "x-api-key: ${KEY}" -X GET -H "Content-Type: application/json" \
"https://admin.api.crowdsec.net/v1/engines/${ENGINE_ID}/remediation_components?page=1&size=50"
answer on success
JSON
{
"items": [
{
"id": "string",
"organization_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"entity_type": "remediation_component",
"name": "string",
"version": "string",
"type": "string",
"last_pull": "2019-08-24T14:15:22Z",
"os": {
"name": "string",
"version": "string",
"family": "string"
}
}
],
"total": 0,
"page": 1,
"size": 1,
"pages": 0,
"links": {
"first": "/api/v1/users?limit=1&offset1",
"last": "/api/v1/users?limit=1&offset1",
"self": "/api/v1/users?limit=1&offset1",
"next": "/api/v1/users?limit=1&offset1",
"prev": "/api/v1/users?limit=1&offset1"
}
}
CrowdSec Docs
We use cookies

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