• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Keystone
  5. User
  6. Querying User Details

Querying User Details

Function Description

This interface is used to query detailed information about a specified user.This interface applies only to domain names in the Global zone.

URI

  • URI format

    GET /v3/users/{user_id}

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    user_id

    Yes

    String

    User ID.

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

    Authenticated token with the Security Administrator permission or token of the user.

  • 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/users/43cbe5e77aaf4665bbb962062dc1fc9d

Response

  • Response body parameter description

    Parameter

    Mandatory

    Type

    Description

    user

    Yes

    JSONObject

    User object.

  • Description for the user format

    Parameter

    Mandatory

    Type

    Description

    enabled

    Yes

    Boolean

    Whether a user is enabled or not.

    id

    Yes

    String

    User ID.

    domain_id

    Yes

    String

    ID of the domain where a user is located.

    name

    Yes

    String

    User name.

    links

    Yes

    JSONObject

    Links to a user resource.

    default_project_id

    No

    String

    Default project ID of a user.

    password_expires_at

    Yes

    String

    Coordinated Universal Time (UTC) that the password expires. null indicates that the password will not expire.

    description

    No

    String

    User description.

  • Sample response
    {
        "user": {
            "default_project_id": "263fd9",
            "domain_id": "1789d1",
            "enabled": true,
            "id": "9fe1d3",
            "links": {
                "self": "https://example.com/identity/v3/users/9fe1d3"
            },
            "name": "jsmith",
            "description": "jsmith",
            "password_expires_at": "2016-11-06T15:32:17.000000"
        }
    }

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.

405

You are not allowed to use the method specified in the request.

413

The request entity is too large.

500

Failed to complete the request because of an internal service error.

503

Failed to complete the request because the service is unavailable.