Skip to main content

Service API: issues

info
  • We're assuming your API key is set in the environment variable $KEY with the necessary permissions.
  • The issues endpoints require a key with issues scope: read access for the GET methods, write access to update or close an issue.
  • The issue-types endpoint requires a key with issue-types scope (read).
  • Otherwise the API returns 403 Forbidden.

An issue is a problem the Console's Stack Health monitoring found on your stack, such as a Security Engine that went offline or a Log Processor that reads no logs. Each issue concerns one entity (a Security Engine, a Log Processor, a blocklist integration), has a severity (info, medium, high or critical) and a status (open, resolved or closed). An issue type describes one kind of issue.

Issuesโ€‹

Get Issuesโ€‹

List the issues of your Organization

All query parameters are optional. The list parameters can be repeated to pass several values.

ParameterDescription
issues_typeIssue types to keep, see Get Issue Types (e.g. security_engine_offline)
entity_idsIDs of the entities to keep. An issue matches on its own entity or on the Security Engine it belongs to
tagsKeep the issues of the entities carrying one of these tags. Returns 404 Not Found if no entity carries them
severitiesinfo, medium, high, critical
is_ignoredtrue for ignored issues only, false for issues that are not ignored
statusopen, resolved or closed
include_hiddenInclude the issues hidden by another issue (e.g. "no activity" while the engine is offline). Default false
page, sizePagination. Default page=1, size=50 (max 100)
SH
curl -i -H "x-api-key: ${KEY}" -X GET -H "Content-Type: application/json" \
"https://admin.api.crowdsec.net/v1/issues?status=open&severities=critical&severities=high&page=1&size=50"
answer on success
JSON
{
"items": [
{
"uuid": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_triggered_at": "2019-08-24T14:15:22Z",
"opened_at": "2019-08-24T14:15:22Z",
"organization_id": "string",
"triggered_count": 1,
"status": "open",
"ignored_until": null,
"is_ignored": false,
"detail": {
"entity_id": "string",
"severity": "critical",
"version": "v1.6.3",
"os": {
"name": "string",
"version": "string",
"family": "string"
},
"last_login": "2019-08-22T07:06:21",
"issue_type": "security_engine_offline",
"name": "string",
"entity_type": "engine"
}
}
],
"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"
}
}

detail always holds issue_type, entity_id, entity_type and severity. Its other fields depend on issue_type: the example above is a security_engine_offline issue.

Get Issues Summaryโ€‹

Count the issues of your Organization by severity, type and status

Accepts the same filters as Get Issues, without page and size.

SH
curl -i -H "x-api-key: ${KEY}" -X GET -H "Content-Type: application/json" \
"https://admin.api.crowdsec.net/v1/issues/summary?status=open"
answer on success
JSON
{
"total_issues": 3,
"by_severity": [
{
"severity": "critical",
"count": 1
},
{
"severity": "high",
"count": 2
}
],
"by_type": [
{
"issue_type": "log_processor_no_logs_read",
"count": 2
},
{
"issue_type": "security_engine_offline",
"count": 1
}
],
"by_status": [
{
"status": "open",
"count": 3
}
],
"ignored_issues": 0
}

Get Issueโ€‹

Retrieve a single issue, using the uuid returned by Get Issues

SH
curl -i -H "x-api-key: ${KEY}" -X GET -H "Content-Type: application/json" \
https://admin.api.crowdsec.net/v1/issues/${ISSUE_UUID}
answer on success
JSON
{
"uuid": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_triggered_at": "2019-08-24T14:15:22Z",
"opened_at": "2019-08-24T14:15:22Z",
"organization_id": "string",
"triggered_count": 1,
"status": "open",
"ignored_until": null,
"is_ignored": false,
"detail": {
"entity_id": "string",
"severity": "critical",
"version": "v1.6.3",
"os": {
"name": "string",
"version": "string",
"family": "string"
},
"last_login": "2019-08-22T07:06:21",
"issue_type": "security_engine_offline",
"name": "string",
"entity_type": "engine"
}
}

An unknown issue_uuid returns 404 Not Found.

Update Issueโ€‹

Change the status of an issue, or ignore it

The body accepts three optional fields:

  • status: the new status, open, resolved or closed.
  • is_ignored and ignored_until: always sent together. Set is_ignored to true to ignore the issue until the ignored_until date, or indefinitely when ignored_until is null. Set is_ignored to false and ignored_until to null to stop ignoring it.
SH
# Mark the issue as resolved
curl -i -H "x-api-key: ${KEY}" -X PATCH -H "Content-Type: application/json" \
https://admin.api.crowdsec.net/v1/issues/${ISSUE_UUID} \
-d '{ "status": "resolved" }'

# Ignore the issue until a given date
curl -i -H "x-api-key: ${KEY}" -X PATCH -H "Content-Type: application/json" \
https://admin.api.crowdsec.net/v1/issues/${ISSUE_UUID} \
-d '{ "is_ignored": true, "ignored_until": "2026-12-31T00:00:00Z" }'
answer on success
JSON
{
"uuid": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_triggered_at": "2019-08-24T14:15:22Z",
"opened_at": "2019-08-24T14:15:22Z",
"organization_id": "string",
"triggered_count": 1,
"status": "open",
"ignored_until": "2026-12-31T00:00:00Z",
"is_ignored": true,
"detail": {
"entity_id": "string",
"severity": "critical",
"version": "v1.6.3",
"os": {
"name": "string",
"version": "string",
"family": "string"
},
"last_login": "2019-08-22T07:06:21",
"issue_type": "security_engine_offline",
"name": "string",
"entity_type": "engine"
}
}

Sending only one of is_ignored and ignored_until returns 422 Unprocessable Entity. An unknown issue_uuid returns 404 Not Found.

Close Issueโ€‹

Close an issue. The issue is not deleted: its status is set to closed.

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

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

Issue typesโ€‹

Get Issue Typesโ€‹

List the issue types the Console can raise

SH
curl -i -H "x-api-key: ${KEY}" -X GET -H "Content-Type: application/json" \
https://admin.api.crowdsec.net/v1/issue-types
answer on success
JSON
{
"items": [
{
"issue_type": "security_engine_offline",
"label": "Security Engine: offline",
"description": "Security Engine is offline for more than 24 hours and cannot detect or block attacks.",
"severity": "critical",
"entity_type": "engine",
"solution_links": [
"string"
]
}
]
}

Use the issue_type values to filter Get Issues with issues_type. solution_links points to the troubleshooting guides for the issue.

CrowdSec Docs
We use cookies

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