Crowdsec Metrics API
The Metrics API from Crowdsec — 1 operation(s) for metrics.
The Metrics API from Crowdsec — 1 operation(s) for metrics.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/crowdsec:crowdsec-metrics-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Service Metrics API
description: This is the API to manage Crowdsec services
contact:
name: CrowdSec
url: https://crowdsec.net/
email: info@crowdsec.net
version: 1.87.2
servers:
- url: https://admin.api.crowdsec.net/v1/
description: Production server
security:
- ApiKeyAuth: []
- BasicAuth: []
tags:
- name: Metrics
paths:
/metrics/remediation:
get:
tags:
- Metrics
summary: Get Metrics Remediation
description: Get remediation metrics
operationId: getMetricsRemediation
parameters:
- name: start_date
in: query
required: false
schema:
type: string
format: date-time
description: Start date of the metrics, default to last day
title: Start Date
description: Start date of the metrics, default to last day
- name: end_date
in: query
required: false
schema:
type: string
format: date-time
description: End date of the metrics
title: End Date
description: End date of the metrics
- name: engine_ids
in: query
required: false
schema:
type: array
items:
type: string
description: List of engine ids
default: []
title: Engine Ids
description: List of engine ids
- name: integration_ids
in: query
required: false
schema:
type: array
items:
type: string
description: List of integration ids
default: []
title: Integration Ids
description: List of integration ids
- name: tags
in: query
required: false
schema:
type: array
items:
type: string
description: List of tags
default: []
title: Tags
description: List of tags
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/GetRemediationMetricsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
GetRemediationMetricsResponse:
properties:
raw:
$ref: '#/components/schemas/RawMetrics'
description: Raw metrics data
computed:
$ref: '#/components/schemas/ComputedMetrics'
description: Computed metrics data
type: object
required:
- raw
- computed
title: GetRemediationMetricsResponse
PricingTiers:
type: string
enum:
- free
- premium
- platinum
title: PricingTiers
RemediationMetricsData:
properties:
value:
anyOf:
- type: integer
- type: number
title: Value
description: Value of the metric
timestamp:
type: string
format: date-time
title: Timestamp
description: Timestamp of the metric
type: object
required:
- value
- timestamp
title: RemediationMetricsData
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
OriginMetrics:
properties:
origin:
anyOf:
- $ref: '#/components/schemas/BlocklistOrigin'
- type: string
- type: 'null'
title: Origin
description: Origin of the metric
data:
items:
$ref: '#/components/schemas/RemediationMetricsData'
type: array
title: Data
description: Data points
type: object
required:
- origin
- data
title: OriginMetrics
ComputedSavedMetrics:
properties:
log_lines:
items:
$ref: '#/components/schemas/RemediationMetrics'
type: array
title: Log Lines
description: estimated log lines saved
default: []
storage:
items:
$ref: '#/components/schemas/RemediationMetrics'
type: array
title: Storage
description: estimated storage saved
default: []
egress_traffic:
items:
$ref: '#/components/schemas/RemediationMetrics'
type: array
title: Egress Traffic
description: estimated egress traffic saved
default: []
type: object
title: ComputedSavedMetrics
RemediationMetrics:
properties:
total:
anyOf:
- type: integer
- type: number
title: Total
description: Total value of the metric
unit:
$ref: '#/components/schemas/MetricUnits'
description: Unit of the metric
progression:
anyOf:
- type: integer
- type: 'null'
title: Progression
description: Progression of the metric value from the previous period
data:
items:
$ref: '#/components/schemas/OriginMetrics'
type: array
title: Data
description: Data points per origin
type: object
required:
- total
- unit
- progression
- data
title: RemediationMetrics
BlocklistOrigin:
properties:
label:
type: string
title: Label
description: Label of the blocklist
id:
type: string
title: Id
description: ID of the blocklist
pricing_tier:
$ref: '#/components/schemas/PricingTiers'
description: Pricing tier of the blocklist
type: object
required:
- label
- id
- pricing_tier
title: BlocklistOrigin
MetricUnits:
type: string
enum:
- byte
- packet
- request
- ip
- line
- event
title: MetricUnits
ComputedMetrics:
properties:
saved:
$ref: '#/components/schemas/ComputedSavedMetrics'
description: estimated saved metrics
dropped:
items:
$ref: '#/components/schemas/RemediationMetrics'
type: array
title: Dropped
description: estimated dropped metrics
default: []
prevented:
items:
$ref: '#/components/schemas/AttacksMetrics'
type: array
title: Prevented
description: prevented attacks metrics
default: []
type: object
required:
- saved
title: ComputedMetrics
AttacksMetrics:
properties:
total:
anyOf:
- type: integer
- type: number
title: Total
description: Total value of the metric
label:
type: string
title: Label
description: Label of the metric which is the attack type
progression:
anyOf:
- type: integer
- type: 'null'
title: Progression
description: Progression of the metric value from the previous period
data:
items:
$ref: '#/components/schemas/RemediationMetricsData'
type: array
title: Data
description: Data points
type: object
required:
- total
- label
- progression
- data
title: AttacksMetrics
RawMetrics:
properties:
dropped:
items:
$ref: '#/components/schemas/RemediationMetrics'
type: array
title: Dropped
description: dropped metrics
default: []
processed:
items:
$ref: '#/components/schemas/RemediationMetrics'
type: array
title: Processed
description: processed metrics
default: []
type: object
title: RawMetrics
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key
description: If integration key is provided, can also work to get integration content
BasicAuth:
type: http
scheme: basic
description: Basic Auth for integration content endpoint only