## List rules for a detector `detectors.rules.list(strdetector_id) -> RuleListResponse` **get** `/api/detectors/{detectorId}/rules` List rules for a detector ### Parameters - `detector_id: str` ### Returns - `class RuleListResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `messages: List[Message]` - `code: int` - `message: str` - `result: Result` - `rules: List[ResultRule]` - `id: str` - `condition: Condition` - `class LeafCondition: …` - `leaf: Leaf` - `fact: str` - `op: Literal["eq", "neq", "in", 4 more]` - `"eq"` - `"neq"` - `"in"` - `"nin"` - `"contains"` - `"matches"` - `"between"` - `value: Union[str, float, bool, 2 more]` - `str` - `float` - `bool` - `List[str]` - `List[float]` - `class RefCondition: …` - `ref: Ref` - `fact: str` - `op: Literal["eq", "neq", "in", "nin"]` - `"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"]]` - `"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` ### Example ```python import os from rake import Rake client = Rake( api_key=os.environ.get("RAKE_API_KEY"), # This is the default and can be omitted ) rules = client.detectors.rules.list( "detectorId", ) print(rules.errors) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message" } ], "messages": [ { "code": 1000, "message": "message" } ], "result": { "rules": [ { "id": "id", "condition": { "leaf": { "fact": "fact", "op": "eq", "value": "string" } }, "detectorId": "detectorId", "enabled": true, "name": "name", "notify": true, "priority": 0 } ] }, "success": true } ```