Assign Role To Machine
Assign one or more roles to one or more machines. All roles and machines must belong to the same organization.
| Verb | POST |
|---|---|
| Endpoint | {base-url}/roles/assign/machine |
| Max Page Size | N/A |
Request Body
{
"requestFilter": {
"organizationIds": [1],
"machineIdentifiers": ["3283"]
},
"routeFilter": {
"roleIdentifiers": [1, 2, 3]
}
}
Filters Honored
- RequestFilter
- machineIdentifiers
- PermissionsFilter
- roleIdentifiers
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.
Response Body
// 204 - No Content
On Error
| HTTP Code | Error Code | Definition |
|---|---|---|
| 403 | DATA_ACCESS_VIOLATION | One or more of the specified machines or roles does not belong to an organization you have access to. |
| 403 | DATA_ACCESS_VIOLATION | The specified machines and roles do not all belong to the same organization. |
| 404 | MISSING_RECORD | One or more of the specified machines or roles does not exist. |