POST /api/usergroups
{
"usergroup": {
"name": "test_usergroup",
"role_ids": [
1,
3,
4
]
}
}
201
{
"admin": false,
"created_at": "2022-03-29 08:50:12 UTC",
"updated_at": "2022-03-29 08:50:12 UTC",
"name": "test_usergroup",
"id": 4,
"external_usergroups": [],
"usergroups": [],
"users": [],
"roles": [
{
"name": "Manager",
"id": 1,
"description": null,
"origin": "foreman"
},
{
"name": "View hosts",
"id": 3,
"description": null,
"origin": "foreman"
},
{
"name": "Edit hosts",
"id": 4,
"description": null,
"origin": "foreman"
}
]
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request Validations:
|
|
usergroup required |
Validations:
|
|
usergroup[name] required |
Validations:
|
|
usergroup[admin] optional , nil allowed |
is an admin user group, can be modified by admins only Validations:
|
|
usergroup[user_ids] optional , nil allowed |
Validations:
|
|
usergroup[usergroup_ids] optional , nil allowed |
Validations:
|
|
usergroup[role_ids] optional , nil allowed |
Validations:
|