Help Center/ Identity and Access Management/ API Reference/ Out-of-Date APIs/ Querying User Groups Associated with an Enterprise Project
Updated on 2022-09-21 GMT+08:00

Querying User Groups Associated with an Enterprise Project

Function Description

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

This API will be deprecated soon. Please use the API described in Querying User Groups Associated with an Enterprise Project instead.

URI

  • URI format

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

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    enterprise_project_id

    Yes

    String

    ID of the enterprise project for querying associated user groups.

Request

  • Request header parameter description

    Parameter

    Mandatory

    Type

    Description

    X-Auth-Token

    Yes

    String

    Authenticated token with Security Administrator permissions.

    Content-Type

    Yes

    String

    Fill application/json;charset=utf8 in this field.

  • Sample request
    curl -i -k -H "X-Auth-Token:$token" -H 'Content-Type:application/json;charset=utf8' -X GET https://iam.myhuaweicloud.eu/v3.0/OS-PAP/enterprise-projects/535fb147-6148-4c71-a679-b79a2cb0ee5d/groups

Response

  • Response body parameter description

    Parameter

    Mandatory

    Type

    Description

    groups

    Yes

    Array

    Details about the user groups associated with the specified enterprise project.

  • User groups format

    Parameter

    Mandatory

    Type

    Description

    group_id

    Yes

    String

    ID of a user group.

    group_name

    Yes

    String

    Name of the user group.

    group_desc

    Yes

    String

    Description of the user group.

    user_num

    Yes

    Int

    Number of users contained in the user group.

    policy_num

    Yes

    Int

    Number of policies that have been configured for the user group.

    created_at

    Yes

    Int

    Time when the user group was created. The value is a Unix timestamp in millisecond.

  • Example response: Querying an enterprise project with associated user groups
    {
        "groups": [
            {
                "group_id": "758b99fa1fa24ec4a297d44e092bd...",
                "group_name": "Test",
                "group_desc": "Test",
                "user_num": 4,
                "policy_num": 1,
                "created_at": 1549088526...
            }
        ]
    }
  • If an enterprise project without any associated user groups is queried, the response body is empty.
    {
      "groups": []
    }

Status Codes

Status Code

Description

200

The request is successful.

400

The server failed to process the request.

401

You must enter a username and password to access the requested page.

403

Access denied.

404

The server could not find the requested page.