Put Machine Settings
Creates/updates a set of machine settings. This supports mixed operations where some settings in the request are being created and others updated.
About updates
To facilitate historical tracking of settings when you update a setting, the setting you wanted to update is marked as not current and inactive, then a new setting is created. If this is important to your application please capture the ID of the updated setting as it WILL be different than the one you sent up.
| Verb | PUT |
|---|---|
| Endpoint | {base-url}/machines/settings |
| Max Page Size | N/A |
Request Body
{
"body":
[
{
// "id": 1
"machineId": 402,
"settings": "arsarsa 3: the harrowing",
"isActive": true,
"isCurrent": true,
"type": "asairens"
}
]
}
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 requested list of created/updated machine settings.
Response Body
[
1
]
On Error
| HTTP Code | Error Code | Definition |
|---|---|---|
| 403 | DATA_ACCESS_VIOLATION | One or more settings reference a machineId that belongs to an organization you do not have access to, or one of the provided setting IDs belongs to a machine outside your accessible organizations. |
| 404 | MISSING_RECORD | One or more settings reference a machineId that does not exist. |
| 422 | VALIDATION_ERROR | One or more settings failed model validation (e.g. machineId is missing or zero, type exceeds 50 characters). |