
# 列出用户组 - SCIMListGroups
#### 功能介绍
对现有用户组列表执行筛选查询，最多只能返回50个结果。
#### URI
GET /{tenant_id}/scim/v2/Groups
表1路径参数 
| 参数        | 是否必选 | 参数类型   | 描述              |
|:---|:---|:---|:---|
| tenant_id | 是    | String | 租户的全局唯一标识符（ID）。 |
   
#### 请求参数
表2请求Header参数 
| 参数            | 是否必选 | 参数类型   | 描述    |
|:---|:---|:---|:---|
| Authorization | 是    | String | 承载令牌。 |
   
#### 响应参数
**状态码： 200**
表3响应Body参数 
| 参数                                                                               | 参数类型             | 描述          |
|:---|:---|:---|
| totalResults                                                                     | Integer          | 总结果数。       |
| itemsPerPage                                                                     | Integer          | 每页的元素个数。    |
| startIndex                                                                       | String           | 起始索引。       |
| schemas                                                                          | Array of strings | 概要。         |
| [Resources] | Array of objects | 包含用户组信息的列表。 |
   
 表4Resources 
| 参数                                                                              | 参数类型             | 描述               |
|:---|:---|:---|
| id                                                                              | String           | 用户组的全局唯一标识符（ID）。 |
| externalId                                                                      | String           | 外部标识符。           |
| [meta]          | Object           | 元数据。             |
| schemas                                                                         | Array of strings | 概要。              |
| displayName                                                                     | String           | 包含用户组显示名称的字符串。   |
| [members] | Array of objects | 用户组中的成员对象列表。     |
   
 表5Resources.meta 
| 参数           | 参数类型   | 描述        |
|:---|:---|:---|
| resourceType | String | 资源类型。     |
| created      | String | 资源创建时间。   |
| lastModified | String | 资源最后更新时间。 |
   
 表6Resources.members 
| 参数    | 参数类型   | 描述              |
|:---|:---|:---|
| value | String | 成员的全局唯一标识符（ID）。 |
| $ref  | String | 成员的引用信息。        |
| type  | String | 成员类型，User：用户。   |
   
**状态码： 400**
表7响应Body参数 
| 参数        | 参数类型             | 描述    |
|:---|:---|:---|
| schema    | String           | 概要。   |
| schemas   | Array of strings | 概要列表。 |
| detail    | String           | 异常详情。 |
| status    | Integer          | 状态码。  |
| timeStamp | String           | 时间戳。  |
   
**状态码： 403**
表8响应Body参数 
| 参数        | 参数类型             | 描述    |
|:---|:---|:---|
| schema    | String           | 概要。   |
| schemas   | Array of strings | 概要列表。 |
| detail    | String           | 异常详情。 |
| status    | Integer          | 状态码。  |
| timeStamp | String           | 时间戳。  |
   
**状态码： 404**
表9响应Body参数 
| 参数        | 参数类型             | 描述    |
|:---|:---|:---|
| schema    | String           | 概要。   |
| schemas   | Array of strings | 概要列表。 |
| detail    | String           | 异常详情。 |
| status    | Integer          | 状态码。  |
| timeStamp | String           | 时间戳。  |
   
**状态码： 409**
表10响应Body参数 
| 参数        | 参数类型             | 描述    |
|:---|:---|:---|
| schema    | String           | 概要。   |
| schemas   | Array of strings | 概要列表。 |
| detail    | String           | 异常详情。 |
| status    | Integer          | 状态码。  |
| timeStamp | String           | 时间戳。  |
   
**状态码： 500**
表11响应Body参数 
| 参数        | 参数类型             | 描述    |
|:---|:---|:---|
| schema    | String           | 概要。   |
| schemas   | Array of strings | 概要列表。 |
| detail    | String           | 异常详情。 |
| status    | Integer          | 状态码。  |
| timeStamp | String           | 时间戳。  |
   
#### 请求示例
列出用户组。
```
GET https://{hostname}/{tenant_id}/scim/v2/Groups
```
#### 响应示例
**状态码： 200**
Successful
```
{
  "totalResults" : 1,
  "itemsPerPage" : 10,
  "startIndex" : "649040aaaaaaaaaaaa3e3050",
  "schemas" : [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ],
  "Resources" : [ {
    "id" : "0efaa0db-6aa4-7aaa-6aa5-c222aaaaf31a",
    "meta" : {
      "resourceType" : "Group",
      "created" : "2023-04-08T14:53:43Z",
      "lastModified" : "2023-04-08T14:53:43Z"
    },
    "schemas" : [ "urn:ietf:params:scim:schemas:core:2.0:Group" ],
    "displayName" : "SCIM用户组名g1",
    "members" : [ {
      "value" : "ac6aa714-daa7-1aaa-aaa2-6715aaaa4dd9",
      "$ref" : "../Users/ac6aa714-daa7-1aaa-aaa2-6715aaaa4dd9",
      "type" : "User"
    } ]
  } ]
}
```
#### 状态码
请参见[状态码](https://support.huaweicloud.com/api-identitycenter/iic_04_0030.html)。
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-identitycenter/ErrorCode.html)。
