Updated on 2023-07-05 GMT+08:00

Querying Project Information

Function

This API is used to query the detailed information about a project based on the project ID.

The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.

URI

GET /v3/projects/{project_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

ID of the project to be queried. For details about how to obtain the project ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information.

Request Parameters

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

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

X-Auth-Token

Yes

String

IAM user token (no special permission requirements).

Response Parameters

Table 3 Parameters in the response body

Parameter

Type

Description

project

Object

Project information.

Table 4 project

Parameter

Type

Description

is_domain

Boolean

The value is false.

description

String

Description of the project.

links

Object

Project resource link.

enabled

Boolean

Enabling status of the project.

id

String

Project ID.

parent_id

String

ID of the specified subproject or account ID of a specified system project, for example, the ap-southeast-1 project.

domain_id

String

Account ID of the project.

name

String

Project name.

Example Request

Request for querying project information

GET https://iam.myhuaweicloud.com/v3/projects/{project_id}

Example Response

Status code: 200

The request is successful.

{
    "project": {
        "is_domain": false,
        "description": "",
        "links": {
            "self": "https://iam.myhuaweicloud.com/v3/projects/2e93d63d8d2249f5a4ac5e2c78586a6e"
        },
        "enabled": true,
        "id": "2e93d63d8d2249f5a4ac5e2c78586a6e",
        "parent_id": "44c0781c83484eb9a4a5d4d233522cea",
        "domain_id": "44c0781c83484eb9a4a5d4d23...",
        "name": "MOS"
    }
}

Status Codes

Status Code

Description

200

The request is successful.

400

Invalid parameters.

401

Authentication failed.

403

Access denied.

404

The requested resource cannot be found.

500

Internal server error.

Error Codes

None