Help Center > > API Reference> Project Management> Querying Project Information

Querying Project Information

Updated at: Apr 09, 2020 GMT+08:00

Function

This API is used to query project information.

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

Table 1 Query parameters

Parameter

Mandatory

Type

Description

domain_id

No

String

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

enabled

No

Boolean

Enabling status of the project

is_domain

No

Boolean

This field can be left blank.

name

No

String

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

page

No

Integer

Page number for pagination query. The minimum value is 1. This parameter must be used together with per_page.

parent_id

No

String

Specify the ID of a created subproject.

Alternatively, specify the account ID of a system project, for example, the cn-north-4 project.

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

per_page

No

Integer

Number of data records to be displayed on each page. The value ranges from 1 to 5000. This parameter must be used together with page.

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

links

Object

Resource link information

projects

Array of objects

Project information

Table 5 projects

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 cn-north-4 project.

domain_id

String

Account ID

name

String

Project name

Example Request

GET https://iam.myhuaweicloud.com/v3/projects

Example Response

Status code: 200

The request is successful.

{
    "projects": [
        {
            "domain_id": "d78cbac186b744899480f25bd02...",
            "is_domain": false,
            "parent_id": "d78cbac186b744899480f25bd022...",
            "name": "ap-southeast-2",
            "description": "",
            "links": {
                "next": null,
                "previous": null,
                "self": "https://iam.huaweicloud.com/v3/projects/06f1c15e6f0010672f86c003006c5f17"
            },
            "id": "06f1c15e6f0010672f86c00300...",
            "enabled": true
        },
        {
            "domain_id": "d78cbac186b744899480f25bd...",
            "is_domain": false,
            "parent_id": "d78cbac186b744899480f25bd0...",
            "name": "ap-southeast-1",
            "description": "",
            "links": {
                "next": null,
                "previous": null,
                "self": "https://iam.huaweicloud.com/v3/projects/065a7c66da0010992ff7c0031e5a..."
            },
            "id": "065a7c66da0010992ff7c0031e5a...",
            "enabled": true
        }
    ],
    "links": {
        "next": null,
        "previous": null,
        "self": "https://iam.huaweicloud.com/v3/projects"
    }
}

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.

503

Service unavailable.

Error Codes

None

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel