description:the list of scenarios enabled on the watcher
type:array
items:
type:string
required:
- machine_id
- password
WatcherAuthResponse:
title:WatcherAuthResponse
description:the response of a successful authentication
type:object
properties:
code:
type:integer
expire:
type:string
token:
type:string
Alert:
title:Alert
type:object
properties:
id:
description:'only relevant for GET, ignored in POST requests'
type:integer
readOnly:true
machine_id:
description:'only relevant for APIL->APIC, ignored for cscli->APIL and crowdsec->APIL'
type:string
readOnly:true
created_at:
description:'only relevant for GET, ignored in POST requests'
type:string
readOnly:true
scenario:
type:string
scenario_hash:
type:string
scenario_version:
type:string
message:
description:a human readable message
type:string
events_count:
type:integer
format:int32
start_at:
type:string
stop_at:
type:string
capacity:
type:integer
format:int32
leakspeed:
type:string
simulated:
type:boolean
events:
description:the Meta of the events leading to overflow
type:array
items:
$ref:'#/definitions/Event'
remediation:
type:boolean
decisions:
type:array
items:
$ref:'#/definitions/Decision'
source:
$ref:'#/definitions/Source'
meta:
$ref:'#/definitions/Meta'
labels:
type:array
items:
type:string
required:
- scenario
- scenario_hash
- scenario_version
- message
- events_count
- start_at
- stop_at
- capacity
- leakspeed
- simulated
- events
- source
Source:
title:Source
type:object
properties:
scope:
description: 'the scope of a source :ip,range,username,etc'
type:string
value:
description: 'the value of a source :the ip, the range, the username,etc'
type:string
ip:
description:provided as a convenience when the source is an IP
type:string
range:
description:provided as a convenience when the source is an IP
type:string
as_number:
description:provided as a convenience when the source is an IP
type:string
as_name:
description:provided as a convenience when the source is an IP
type:string
cn:
type:string
latitude:
type:number
format:float
longitude:
type:number
format:float
required:
- scope
- value
Metrics:
title:Metrics
type:object
properties:
apil_version:
description:the local version of crowdsec/apil
type:string
bouncers:
type:array
items:
$ref:'#/definitions/MetricsBouncerInfo'
machines:
type:array
items:
$ref:'#/definitions/MetricsAgentInfo'
required:
- apil_version
- bouncers
- machines
MetricsBouncerInfo:
title:MetricsBouncerInfo
description:Software version info (so we can warn users about out-of-date software). The software name and the version are "guessed" from the user-agent
type:object
properties:
custom_name:
type:string
description:name of the component
name:
type:string
description:bouncer type (firewall, php ...)
version:
type:string
description:software version
last_pull:
type:string
description:last bouncer pull date
MetricsAgentInfo:
title:MetricsAgentInfo
description:Software version info (so we can warn users about out-of-date software). The software name and the version are "guessed" from the user-agent
type:object
properties:
name:
type:string
description:name of the component
version:
type:string
description:software version
last_update:
type:string
description:last agent update date
last_push:
type:string
description:last agent push date
Decision:
title:Decision
type:object
properties:
id:
description:(only relevant for GET ops) the unique id
type:integer
readOnly:true
origin:
description: 'the origin of the decision :cscli, crowdsec'
type:string
type:
description:'the type of decision, might be ''ban'', ''captcha'' or something custom. Ignored when watcher (cscli/crowdsec) is pushing to APIL.'
type:string
scope:
description: 'the scope of decision :does it apply to an IP, a range, a username, etc'
type:string
value:
description: 'the value of the decision scope :an IP, a range, a username, etc'
type:string
duration:
description:'the duration of the decisions'
type:string
until:
type:string
description:'the date until the decisions must be active'
scenario:
type:string
simulated:
type:boolean
description:'true if the decision result from a scenario in simulation mode'
readOnly:true
required:
- origin
- type
- scope
- value
- duration
- scenario
DeleteDecisionResponse:
title:DeleteDecisionResponse
type:object
properties:
nbDeleted:
type:string
description:"number of deleted decisions"
AddAlertsRequest:
title:AddAlertsRequest
type:array
items:
$ref:'#/definitions/Alert'
AddAlertsResponse:
title:AddAlertsResponse
type:array
items:
type:string
description:alert_id
GetAlertsResponse:
title:AlertsResponse
type:array
items:
$ref:'#/definitions/Alert'
DeleteAlertsResponse:
title:DeleteAlertsResponse
type:object
properties:
nbDeleted:
type:string
description:"number of deleted alerts"
DecisionsStreamResponse:
title:DecisionsStreamResponse
type:object
properties:
new:
$ref:'#/definitions/GetDecisionsResponse'
deleted:
$ref:'#/definitions/GetDecisionsResponse'
Event:
title:Event
type:object
properties:
timestamp:
type:string
meta:
$ref:'#/definitions/Meta'
required:
- timestamp
- meta
GetDecisionsResponse:
title:GetDecisionsResponse
type:array
items:
$ref:'#/definitions/Decision'
Meta:
title:Meta
description:the Meta data of the Alert itself
type:array
items:
type:object
properties:
key:
type:string
value:
type:string
ErrorResponse:
type:"object"
required:
- "message"
properties:
message:
type:"string"
description:"Error message"
errors:
type:"string"
description:"more detail on individual errors"
title:"error response"
description:"error response return by the API"
AddSignalsRequest:
title:"add signals request"
type:"array"
description:"All signals request model"
items:
$ref:"#/definitions/AddSignalsRequestItem"
AddSignalsRequestItem:
type:"object"
required:
- "message"
- "scenario"
- "scenario_hash"
- "scenario_version"
- "source"
- "start_at"
- "stop_at"
- "scenario_trust"
properties:
scenario_hash:
type:"string"
scenario:
type:"string"
created_at:
type:"string"
machine_id:
type:"string"
source:
$ref:"#/definitions/Source"
scenario_version:
type:"string"
scenario_trust:
type:"string"
message:
type:"string"
description:"a human readable message"
start_at:
type:"string"
stop_at:
type:"string"
title:"Signal"
tags:
- name:bouncers
description: 'Operations about decisions :bans, captcha, rate-limit etc.'
- name:watchers
description: 'Operations about watchers :cscli & crowdsec'