GET /api/usergroups
Список всех групп пользователей

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

search
необязательно

отфильтровать результаты

Validations:

  • Must be a String

order
необязательно

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
необязательно

Номер страницы, начиная с 1

Validations:

  • Must be a number.

per_page
необязательно

Число элементов на странице

Validations:

  • Must be a number.

Search fields

Field name Тип Possible values
name
role
role_id

GET /api/usergroups/:id
Показать группу пользователя

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

id
обязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/usergroups
Создать группу пользователя

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

usergroup
обязательно

Validations:

  • Must be a Hash

usergroup[name]
обязательно

Validations:

  • Must be a String

usergroup[admin]
необязательно , nil разрешен

is an admin user group

Validations:

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

usergroup[user_ids]
необязательно , nil разрешен

Validations:

  • Must be an array of any type

usergroup[usergroup_ids]
необязательно , nil разрешен

Validations:

  • Must be an array of any type

usergroup[role_ids]
необязательно , nil разрешен

Validations:

  • Must be an array of any type


PUT /api/usergroups/:id
Изменить группу пользователя

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.

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

id
обязательно

Validations:

  • Must be a String

usergroup
обязательно

Validations:

  • Must be a Hash

usergroup[name]
необязательно

Validations:

  • Must be a String

usergroup[admin]
необязательно , nil разрешен

is an admin user group

Validations:

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

usergroup[user_ids]
необязательно , nil разрешен

Validations:

  • Must be an array of any type

usergroup[usergroup_ids]
необязательно , nil разрешен

Validations:

  • Must be an array of any type

usergroup[role_ids]
необязательно , nil разрешен

Validations:

  • Must be an array of any type


DELETE /api/usergroups/:id
Удалить группу пользователя

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

id
обязательно

Validations:

  • Must be a String