Help Center/ Identity and Access Management/ API Reference/ API/ Enterprise Project Management/ Querying User Groups Associated with an Enterprise Project
Updated on 2023-09-14 GMT+08:00

Querying User Groups Associated with an Enterprise Project

Function

This API is used to query the user groups directly associated with a specified enterprise project.

The API can be called using both the global endpoint and region-specific endpoints.

URI

GET /v3.0/OS-PERMISSION/enterprise-projects/{enterprise_project_id}/groups

Table 1 URI parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

Yes

String

ID of the enterprise project for querying the permissions of an associated user group.

Request Parameters

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Authenticated token with iam:permissions:listGroupsOnEnterpriseProject or Security Administrator permission. The domain_id of the account to which the enterprise_project_id belongs must be the same as the domain_id in the token.

Response Parameters

Status code: 200

Table 3 Parameters in the response body

Parameter

Type

Description

groups

Array of objects

User group information.

Table 4 ListGroupsForEnterpriseProjectResDetail

Parameter

Type

Description

createTime

Integer

Time when the user group was created.

description

String

User group description.

domainId

String

Account ID.

id

String

User group ID.

name

String

User group name.

Example Request

Request for querying user groups associated with an enterprise project

GET https://iam.myhuaweicloud.eu/v3.0/OS-PERMISSION/enterprise-projects/{enterprise_project_id}/groups 

Example Response

Status code: 200

The request is successful.

{ 
  "groups" : [ { 
    "createTime" : 1552093271000, 
    "description" : null, 
    "domainId" : "dc7f62ae236c47b8836014c16d64d...", 
    "id" : "e6bde2403bda43e2813a1a6848963...", 
    "name" : "auth" 
  } ] 
}

Status Codes

Status Code

Description

200

The request is successful.

400

Parameter error.

401

Authentication failed.

403

Access denied.

404

The requested resource cannot be found.

415

Incorrect Content-Type.

500

A system error occurred.

Error Codes

For details, see Error Codes.