GET /api/usergroups/:usergroup_id/external_usergroups
列出用户组的所有外部用户组

GET /api/auth_source_ldaps/:auth_source_ldap_id/external_usergroups
列出 LDAP 认证源的所有外部用户组

示例

GET /api/usergroups/2/external_usergroups
200
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "id": 2,
      "name": "external_usergroup6",
      "auth_source_ldap": {
        "id": 980190964,
        "type": "AuthSourceLdap",
        "name": "auth_source_ldap_273"
      }
    }
  ]
}

参数

参数名字 描述
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_id
必填

用户组 ID 或名称

Validations:

  • Must be a String


GET /api/usergroups/:usergroup_id/external_usergroups/:id
显示用户组的外部用户组

GET /api/auth_source_ldaps/:auth_source_ldap_id/external_usergroups/:id
显示 LDAP 认证源的外部用户组

示例

GET /api/usergroups/1/external_usergroups/1
200
{
  "id": 1,
  "name": "external_usergroup5",
  "auth_source_ldap": {
    "id": 980190963,
    "type": "AuthSourceLdap",
    "name": "auth_source_ldap_272"
  }
}

参数

参数名字 描述
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_id
必填

用户组 ID 或名称

Validations:

  • Must be a String

id
必填

外部用户组 ID 或名称

Validations:

  • Must be a String


POST /api/usergroups/:usergroup_id/external_usergroups
创建链接到用户组的外部用户组

示例

POST /api/usergroups/4-usergroup362/external_usergroups
{
  "external_usergroup": {
    "name": "foremanusergroup",
    "auth_source_id": 980190966
  }
}
201
{
  "id": 4,
  "name": "foremanusergroup",
  "auth_source_ldap": {
    "id": 980190966,
    "type": "AuthSourceLdap",
    "name": "auth_source_ldap_275"
  }
}

参数

参数名字 描述
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_id
必填

用户组 ID 或名称

Validations:

  • Must be a String

external_usergroup
必填

外部用户组信息

Validations:

  • Must be a Hash

external_usergroup[name]
必填

外部用户组名称

Validations:

  • Must be a String

external_usergroup[auth_source_id]
必填

链接认证源 ID

Validations:

  • Must be a number.


PUT /api/usergroups/:usergroup_id/external_usergroups/:id
更新外部用户组

示例

PUT /api/usergroups/6/external_usergroups/6
{
  "external_usergroup": {
    "name": "foremanusergroup"
  }
}
200
{
  "id": 6,
  "name": "foremanusergroup",
  "auth_source_ldap": {
    "id": 980190968,
    "type": "AuthSourceLdap",
    "name": "auth_source_ldap_277"
  }
}

参数

参数名字 描述
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_id
必填

用户组 ID 或名称

Validations:

  • Must be a String

id
必填

外部用户组 ID 或名称

Validations:

  • Must be a String

external_usergroup
必填

外部用户组信息

Validations:

  • Must be a Hash

external_usergroup[name]
选填

外部用户组名称

Validations:

  • Must be a String

external_usergroup[auth_source_id]
选填

链接认证源 ID

Validations:

  • Must be a number.


PUT /api/usergroups/:usergroup_id/external_usergroups/:id/refresh
刷新外部用户组

示例

PUT /api/usergroups/5/external_usergroups/5/refresh
{
  "external_usergroup": {}
}
200
{
  "id": 5,
  "name": "external_usergroup8",
  "auth_source_id": 980190967,
  "usergroup_id": 5
}

参数

参数名字 描述
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_id
必填

用户组 ID 或名称

Validations:

  • Must be a String

id
必填

外部用户组 ID 或名称

Validations:

  • Must be a String


DELETE /api/usergroups/:usergroup_id/external_usergroups/:id
删除外部用户组

示例

DELETE /api/usergroups/7/external_usergroups/7
{
  "external_usergroup": {}
}
200
{
  "id": 7,
  "name": "external_usergroup10",
  "auth_source_id": 980190969,
  "usergroup_id": 7
}

参数

参数名字 描述
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_id
必填

用户组 ID 或名称

Validations:

  • Must be a String

id
必填

外部用户组 ID 或名称

Validations:

  • Must be a String