Skip to content
Get started

Detectors

List all detectors
detectors.list() -> DetectorListResponse
GET/api/detectors
Create a new detector
detectors.create(DetectorCreateParams**kwargs) -> DetectorCreateResponse
POST/api/detectors
Delete a detector and its rules
detectors.delete(strdetector_id) -> DetectorDeleteResponse
DELETE/api/detectors/{detectorId}
Evaluate rules against an event
detectors.evaluate(strdetector_id, DetectorEvaluateParams**kwargs) -> DetectorEvaluateResponse
POST/api/detectors/{detectorId}/evaluate
ModelsExpand Collapse
class DetectorListResponse:
errors: List[Error]
code: int
minimum1000
message: str
messages: List[Message]
code: int
minimum1000
message: str
result: List[Result]
id: str
name: str
success: bool
class DetectorCreateResponse:
errors: List[Error]
code: int
minimum1000
message: str
messages: List[Message]
code: int
minimum1000
message: str
result: Result
id: str
success: bool
class DetectorDeleteResponse:
errors: List[Error]
code: int
minimum1000
message: str
messages: List[Message]
code: int
minimum1000
message: str
result: Result
id: str
success: bool
class DetectorEvaluateResponse:
errors: List[Error]
code: int
minimum1000
message: str
messages: List[Message]
code: int
minimum1000
message: str
result: Result
actions: List[object]
success: bool

DetectorsRules

List rules for a detector
detectors.rules.list(strdetector_id) -> RuleListResponse
GET/api/detectors/{detectorId}/rules
Create a new rule
detectors.rules.create(strdetector_id, RuleCreateParams**kwargs) -> RuleCreateResponse
POST/api/detectors/{detectorId}/rules
Update a rule
detectors.rules.update(strid, RuleUpdateParams**kwargs) -> RuleUpdateResponse
PATCH/api/detectors/{detectorId}/rules/{id}
Delete a rule
detectors.rules.delete(strid, RuleDeleteParams**kwargs) -> RuleDeleteResponse
DELETE/api/detectors/{detectorId}/rules/{id}
ModelsExpand Collapse
class AllCondition:
all: List[Condition]
class AnyCondition:
any: List[Condition]
One of the following:
class LeafCondition:
leaf: Leaf
fact: str
op: Literal["eq", "neq", "in", 4 more]
One of the following:
"eq"
"neq"
"in"
"nin"
"contains"
"matches"
"between"
value: Union[str, float, bool, 2 more]
One of the following:
str
float
bool
List[str]
List[float]
class RefCondition:
ref: Ref
fact: str
op: Literal["eq", "neq", "in", "nin"]
One of the following:
"eq"
"neq"
"in"
"nin"
reference: str
class InRelationCondition:
in_relation: InRelation
args: List[object]
relation: str
class AllCondition:
all: List[Condition]
class AnyCondition:
any: List[Condition]
class NotCondition:
not_: Condition
class OnceCondition:
once: Condition
class HistoricallyCondition:
historically: Condition
class SinceCondition:
since: Since
left: Condition
right: Condition
class OnceWithinCondition:
once_within: OnceWithin
inner: Condition
window_secs: float
class HistoricallyForCondition:
historically_for: HistoricallyFor
inner: Condition
window_secs: float
boundary: Optional[Literal["weak", "strong"]]
One of the following:
"weak"
"strong"
class SinceWithinCondition:
since_within: SinceWithin
left: Condition
right: Condition
window_secs: float
class KeyedCondition:
keyed: Keyed
inner: Condition
key: str
class HistoricallyCondition:
historically: Condition
class HistoricallyForCondition:
historically_for: HistoricallyFor
inner: Condition
window_secs: float
boundary: Optional[Literal["weak", "strong"]]
One of the following:
"weak"
"strong"
class InRelationCondition:
in_relation: InRelation
args: List[object]
relation: str
class KeyedCondition:
keyed: Keyed
inner: Condition
key: str
class LeafCondition:
leaf: Leaf
fact: str
op: Literal["eq", "neq", "in", 4 more]
One of the following:
"eq"
"neq"
"in"
"nin"
"contains"
"matches"
"between"
value: Union[str, float, bool, 2 more]
One of the following:
str
float
bool
List[str]
List[float]
class NotCondition:
not_: Condition
class OnceCondition:
once: Condition
class OnceWithinCondition:
once_within: OnceWithin
inner: Condition
window_secs: float
class RefCondition:
ref: Ref
fact: str
op: Literal["eq", "neq", "in", "nin"]
One of the following:
"eq"
"neq"
"in"
"nin"
reference: str
class SinceCondition:
since: Since
left: Condition
right: Condition
class SinceWithinCondition:
since_within: SinceWithin
left: Condition
right: Condition
window_secs: float
class RuleListResponse:
errors: List[Error]
code: int
minimum1000
message: str
messages: List[Message]
code: int
minimum1000
message: str
result: Result
rules: List[ResultRule]
id: str
condition: Condition
One of the following:
class LeafCondition:
leaf: Leaf
fact: str
op: Literal["eq", "neq", "in", 4 more]
One of the following:
"eq"
"neq"
"in"
"nin"
"contains"
"matches"
"between"
value: Union[str, float, bool, 2 more]
One of the following:
str
float
bool
List[str]
List[float]
class RefCondition:
ref: Ref
fact: str
op: Literal["eq", "neq", "in", "nin"]
One of the following:
"eq"
"neq"
"in"
"nin"
reference: str
class InRelationCondition:
in_relation: InRelation
args: List[object]
relation: str
class AllCondition:
all: List[Condition]
class AnyCondition:
any: List[Condition]
class NotCondition:
not_: Condition
class OnceCondition:
once: Condition
class HistoricallyCondition:
historically: Condition
class SinceCondition:
since: Since
left: Condition
right: Condition
class OnceWithinCondition:
once_within: OnceWithin
inner: Condition
window_secs: float
class HistoricallyForCondition:
historically_for: HistoricallyFor
inner: Condition
window_secs: float
boundary: Optional[Literal["weak", "strong"]]
One of the following:
"weak"
"strong"
class SinceWithinCondition:
since_within: SinceWithin
left: Condition
right: Condition
window_secs: float
class KeyedCondition:
keyed: Keyed
inner: Condition
key: str
detector_id: str
enabled: bool
name: str
notify: bool
priority: float
success: bool
class RuleCreateResponse:
errors: List[Error]
code: int
minimum1000
message: str
messages: List[Message]
code: int
minimum1000
message: str
result: Result
id: str
success: bool
class RuleUpdateResponse:
errors: List[Error]
code: int
minimum1000
message: str
messages: List[Message]
code: int
minimum1000
message: str
result: Result
id: str
condition: Condition
One of the following:
class LeafCondition:
leaf: Leaf
fact: str
op: Literal["eq", "neq", "in", 4 more]
One of the following:
"eq"
"neq"
"in"
"nin"
"contains"
"matches"
"between"
value: Union[str, float, bool, 2 more]
One of the following:
str
float
bool
List[str]
List[float]
class RefCondition:
ref: Ref
fact: str
op: Literal["eq", "neq", "in", "nin"]
One of the following:
"eq"
"neq"
"in"
"nin"
reference: str
class InRelationCondition:
in_relation: InRelation
args: List[object]
relation: str
class AllCondition:
all: List[Condition]
class AnyCondition:
any: List[Condition]
class NotCondition:
not_: Condition
class OnceCondition:
once: Condition
class HistoricallyCondition:
historically: Condition
class SinceCondition:
since: Since
left: Condition
right: Condition
class OnceWithinCondition:
once_within: OnceWithin
inner: Condition
window_secs: float
class HistoricallyForCondition:
historically_for: HistoricallyFor
inner: Condition
window_secs: float
boundary: Optional[Literal["weak", "strong"]]
One of the following:
"weak"
"strong"
class SinceWithinCondition:
since_within: SinceWithin
left: Condition
right: Condition
window_secs: float
class KeyedCondition:
keyed: Keyed
inner: Condition
key: str
detector_id: str
enabled: bool
name: str
notify: bool
priority: float
success: bool
class RuleDeleteResponse:
errors: List[Error]
code: int
minimum1000
message: str
messages: List[Message]
code: int
minimum1000
message: str
result: Result
id: str
success: bool