Update Rules
Updates the specified settings rules to the provided values.
| Verb | PATCH |
|---|---|
| Endpoint | {base-url}/machines/settings/rules |
| Max Page Size | N/A |
Request Body
{
"body":
[
{
"id": 1,
"value": "unique at machine",
"setting": "1",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": null,
"machineId": 402,
"createdAt": "2023-08-07T01:48:50.783",
"isActive": true
}
]
}
Note
All changes in this request are atomic. If any item fails, the entire batch is rolled back and no changes are made.
Returns
On Success
The updated settings rules.
Response Body
[
{
"id": 1,
"value": "unique at machine",
"setting": "1",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": null,
"machineId": 402,
"createdAt": "2023-08-07T01:48:50.783",
"isActive": true
}
]
On Error
| HTTP Code | Error Code | Definition |
|---|---|---|
| 403 | DATA_ACCESS_VIOLATION | One or more of the specified rules belong to an organization you do not have access to, or re-point a scope field (accountId, siteId, groupId, machineId) at an organization you do not have access to. |
| 404 | MISSING_RECORD | One or more of the specified rule IDs do not exist or are not active, or re-point a scope field (accountId, siteId, groupId, machineId) at a record that does not exist. |
| 422 | DATA_VALIDATION_ERROR | One or more rules had more than one of the mutually exclusive scope fields (accountId, siteId, groupId, machineId) set to a non-null value. |
| 422 | VALIDATION_ERROR | One or more rules failed model validation (e.g. organizationId is missing or zero, value exceeds 500 characters). |