Luxor PlatformAPI DocumentationCommanderAutomation Rules

Update automation rule

Updates an existing automation rule. Accepts any subset of creation fields, and validates action params on the same terms as create. Common use: flip status between enabled/disabled.

PATCH
/v2/commander/automation/rules/{rule_id}

Authorization

LuxorAPIKey
authorization<token>

Use your API key here.

In: header

Path Parameters

rule_id*string

Rule ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PATCH "https://example.com/v2/commander/automation/rules/r-a1b2c3d4-e5f6-7890-abcd-ef1234567890" \  -H "Content-Type: application/json" \  -d '{}'
Empty
{  "statusCode": 400,  "code": "FST_ERR_VALIDATION",  "error": "Bad Request",  "message": "body/end_date Required"}
{  "statusCode": 403,  "code": "7",  "error": "Forbidden",  "message": "[permission_denied] site_id does not belong to this workspace"}
{  "statusCode": 404,  "code": "5",  "error": "Not Found",  "message": "[not_found] agent not found"}

Create automation rule

Creates a new automation rule. Set rule_type to 'trigger' for condition-based rules or 'schedule' for time-based rules. Each action's params object is action-specific JSON; for 'Change Temperature Control' it accepts the ATM bucket (enabled, startupMinutes, postRampMinutes, minimumProfile, maximumProfile, temperatureBuffer) plus the watt floor minimumPower (0 to remove an existing floor, otherwise a whole number of watts from 500 to 8000; the snake_case spelling minimum_power is rejected here), plus chip and water-inlet thresholds (e.g. chipHotTemperature, chipTargetTemperature, chipDangerousTemperature, waterInletHotTemperature, waterInletStartupTemperature, waterInletDangerousTemperature). For 'Change Mining Profile' it accepts settings: a non-empty array of per-firmware entries, each keyed by firmware. luxos takes powerTarget (whole watts from 500 to 8000) and optionally the AutoTuner band powerLimit and powerMin in the same range, ordered powerMin <= powerTarget <= powerLimit; powerMin accepts 0 to remove an existing floor. The band is LuxOS-only and requires a recent LuxOS build — older firmware rejects the whole power-target command. antminer and whatsminer take profileStep only; avalon is rejected, as Avalon firmware does not support power changes; fluxos takes exactly one of powerTarget or profileStep. Unknown keys are rejected per entry, including snake_case spellings such as power_limit and power_min.

Delete automation rule

Deletes an automation rule. Returns 204 No Content on success.