Luxor Documentation Hub Logo
Luxor Platform/API Documentation/Commander

Get automation rules

Returns a paginated list of automation rules (triggers and schedules) with optional filtering by site, rule type, and status.

GET
/v2/commander/automation/rules

Authorization

authorization<token>

Use your API key here.

In: header

Query Parameters

site_idstring
Format: "uuid"
rule_typestring

Filter by rule type. Applied server-side; pagination reflects the filtered total.

Value in: "trigger" | "schedule"
statusstring

Filter by status. Applied server-side; pagination reflects the filtered total.

Value in: "enabled" | "disabled"
sort_bystring
Value in: "name" | "created_at" | "last_triggered_at" | "times_triggered"
sort_orderstring
Default: "desc"Value in: "asc" | "desc"
page_numberinteger
Default: 1Minimum: 1
page_sizeinteger
Default: 25Minimum: 1
curl -X GET "https://app.luxor.tech/api/v2/commander/automation/rules?site_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&rule_type=trigger&status=enabled&sort_by=name&sort_order=asc&page_number=1&page_size=25" \
  -H "authorization: <token>"

Default Response

{
  "rules": [
    {
      "id": "r-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Miner Overheat Alert",
      "rule_type": "trigger",
      "status": "enabled",
      "site_ids": [
        "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ],
      "frequency": "every_15_min",
      "filter": {
        "apply_to_all": true,
        "combinator": "AND",
        "groups": [
          {
            "combinator": "AND",
            "conditions": [
              {
                "field": "site_id",
                "operator": "eq",
                "value": "string"
              }
            ]
          }
        ]
      },
      "condition": {
        "type": "metric",
        "metric": "site_id",
        "operator": ">",
        "value": "string"
      },
      "schedule": {
        "cron": "0 19 * * *",
        "timezone": "UTC"
      },
      "actions": [
        {
          "action_type": "Reboot",
          "params": {}
        }
      ],
      "stop_condition": {
        "max_executions": 0,
        "period_minutes": 0
      },
      "last_triggered_at": "2026-04-13T18:22:00Z",
      "times_triggered": 4,
      "created_at": "2026-01-10T14:30:00Z",
      "url": "/v2/commander/automation/rules/r-a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
  ],
  "pagination": {
    "page_number": 1,
    "page_size": 1,
    "item_count": 0,
    "previous_page_url": null,
    "next_page_url": null
  }
}