User groups linked to external groups (LDAP) are automatically synced with these groups on update. Remember this synchronization will remove any LDAP users manually added to the Foreman user group. Only LDAP users in the external groups will remain. Internal users can be added or removed freely.

Examples

PUT /api/usergroups/1-usergroup5
{
  "usergroup": {
    "name": "test_usergroup",
    "user_ids": [
      980190962
    ]
  }
}
200
{
  "admin": false,
  "created_at": "2018-11-16 10:03:33 UTC",
  "updated_at": "2018-11-16 10:03:33 UTC",
  "name": "test_usergroup",
  "id": 1,
  "external_usergroups": [],
  "usergroups": [],
  "users": [
    {
      "id": 980190962,
      "login": "one",
      "description": null
    }
  ],
  "roles": []
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a String

usergroup
required

Validations:

  • Must be a Hash

usergroup[name]
optional

Validations:

  • Must be a String

usergroup[admin]
optional , nil allowed

is an admin user group, can be modified by admins only

Validations:

  • Must be one of: true, false, 1, 0.

usergroup[user_ids]
optional , nil allowed

Validations:

  • Must be an array of any type

usergroup[usergroup_ids]
optional , nil allowed

Validations:

  • Must be an array of any type

usergroup[role_ids]
optional , nil allowed

Validations:

  • Must be an array of any type