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
选填

排序项和顺序,例如 ‘id DESC’

Validations:

  • Must be a String

page
选填

页号,从 1 开始

Validations:

  • Must be a number.

per_page
选填

每页中显示的返回结果数

Validations:

  • Must be a number.

搜索字段

字段名 类型 可能的值
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]
选填 , 允许空值

是管理员用户组

Validations:

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

usergroup[user_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

usergroup[usergroup_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

usergroup[role_ids]
选填 , 允许空值

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]
选填 , 允许空值

是管理员用户组

Validations:

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

usergroup[user_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

usergroup[usergroup_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

usergroup[role_ids]
选填 , 允许空值

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