Luxor PlatformAPI DocumentationCommanderAutomation Rules

Create automation rule

Creates a new automation rule. Set rule_type to 'trigger' for condition-based rules or 'schedule' for time-based rules.

POST
/v2/commander/automation/rules

Authorization

LuxorAPIKey
authorization<token>

Use your API key here.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v2/commander/automation/rules" \  -H "Content-Type: application/json" \  -d '{    "name": "Miner Overheat Alert",    "rule_type": "trigger",    "site_ids": [      "ab580781-02e2-4a18-ac1b-8fc9be2f4ad4"    ],    "filter": {},    "actions": [      {        "action_type": "Reboot"      }    ]  }'
{  "id": "r-a1b2c3d4-e5f6-7890-abcd-ef1234567890",  "url": "/v2/commander/automation/rules/r-a1b2c3d4-e5f6-7890-abcd-ef1234567890"}
{  "statusCode": 400,  "code": "FST_ERR_VALIDATION",  "error": "Bad Request",  "message": "body/end_date Required"}
{  "statusCode": 400,  "code": "FST_ERR_VALIDATION",  "error": "Bad Request",  "message": "body/end_date Required"}