Apply Template to Machines
Apply the specified template to the specified machines. You MUST specify at least one template and one machine, and the template and all the machines must belong to the same organization.
| Verb | POST |
|---|---|
| Endpoint | {base-url}/templates/apply |
| Max Page Size | N/A |
Request body
{
"requestFilter": {
"machineIdentifiers": ["3533", "PROSE0123456789"]
},
"routeFilter": {
"templateIds": [412]
}
}
Filters Honored
- TemplatingFilter
- templateIds
- RequestFilter
- machineIdentifiers
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
204 - No Content
On Error
| HTTP Code | Error Code | Definition |
|---|---|---|
| 422 | DESERIALIZATION_ERROR | You provided more than one template when trying to apply a template to machines. |
| 422 | MISSING_REQUIRED_DATA | No template id was provided, or no machines were provided. |
| 403 | DATA_ACCESS_VIOLATION | The template or one or more of the machines belongs to an organization you do not have access to. |
| 404 | MISSING_RECORD | The template, or one or more of the machines, does not exist (or the machine is not active). |