• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Keystone
  5. User
  6. Querying Users in a User Group

Querying Users in a User Group

Function Description

This interface is used to query users in a user group. This interface applies only to domain names in the Global zone.

URI

  • URI format

    GET /v3/groups/{group_id}/users

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    group_id

    Yes

    String

    ID of a user group.

  • Query parameter description

    Parameter

    Mandatory

    Type

    Description

    domain_id

    No

    String

    ID of the domain to which a user group belongs.

    name

    No

    String

    User name.

    enabled

    No

    String

    Whether a domain is enabled. true indicates that the domain is enabled. false indicates that the domain is disabled. The default value is true.

Request

  • Request header parameter description

    Parameter

    Mandatory

    Type

    Description

    Content-Type

    Yes

    String

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

    X-Auth-Token

    Yes

    String

    Valid token (the token of a user with the op_auth or op_service permission, or the token of a user with the secu_admin permission under the current domain)

  • Sample request
    curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -H "X-Auth-Token:$token" -X GET https://172.30.48.86:31943/v3/groups/00007111583e457389b0d4252643181b/users

Response

  • Response body parameter description

    Parameter

    Mandatory

    Type

    Description

    links

    Yes

    JSONObject

    Links of users in a user group, including next, previous, and self.

    users

    Yes

    JSONArray

    List of users in a user group.

  • Description for the group format

    Parameter

    Mandatory

    Type

    Description

    description

    Yes

    String

    Description for a user.

    domain_id

    Yes

    String

    ID of the domain where a user is located.

    enabled

    Yes

    Boolean

    Whether a user is enabled.

    id

    Yes

    String

    ID of a user.

    links

    Yes

    JSONObject

    Links of a user.

    name

    Yes

    String

    User name.

  • Sample response
    {
        "users": [{
            "links": {
                "self": "https://sample.domain.com/v3/users/3b310db5a3eb42eeacdfd81e4a388f66"
            },
            "description": "adminUserDes",
            "name": "account15000008203",
            "enabled": true,
            "id": "3b310db5a3eb42eeacdfd81e4a388f66",
            "domain_id": "eff15dab8c3f443c81cd405ae2092a38"
        }],
        "links": {
            "self": "https://sample.domain.com/v3/groups/00007111583e457389b0d4252643181b/users",
            "previous": null,
            "next": null
        }
    }

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

You are forbidden to access the requested page.

404

The server could not find the requested page.