Update an Operation Rule

View as Markdown
Patch the mutable fields of an Operation Rule: `name`, `description`, and `ruleDefinition`. Unset fields are left unchanged. The rule definition is re-validated server-side; validation failure leaves the rule untouched. `operationType` and `operationCode` are immutable after creation — create a new rule and delete the old one to change them. Org must have an Infrastructure Provider entity. User must have authorization role with `PROVIDER_ADMIN` suffix.

Authentication

AuthorizationBearer
``` export JWT_BEARER_TOKEN="<jwt-bearer-token>" # Example org name: "acme-inc export ORG_NAME=<org-name> # Use the JWT bearer token in your API request auth header: curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current ```

Path parameters

orgstringRequired
Name of the Org
idstringRequiredformat: "uuid"
UUID of the Rule

Request

This endpoint expects an object.
siteIdstringRequiredformat: "uuid"
ID of the Site that owns the rule.
namestringOptional

New rule name. Must be non-empty when provided.

descriptionstringOptional

New free-form description.

ruleDefinitionobjectOptional

Executable definition of a rule. Structurally identical to Flow’s own rule schema, so an existing YAML rule file maps across field for field. The fields declared here use camelCase (componentType, mainOperation, pollInterval) rather than the snake_case of Flow’s YAML; keys inside the free-form parameters map pass through unchanged and stay snake_case (expected_status, component_types).

Response

Rule was updated.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
504
Gateway Timeout Error