Querying Project Information
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
| 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 | Leave this field 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 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
| 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
| Parameter | Type | Description |
|---|---|---|
| Object | Resource link information. | |
| Array of objects | Project information. |
| Parameter | Type | Description |
|---|---|---|
| self | String | Resource link. |
| previous | String | Previous resource link. |
| next | String | Next resource link. |
| Parameter | Type | Description |
|---|---|---|
| is_domain | Boolean | The value is false. |
| description | String | Description of the project. |
| 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. For example, cn-north-4 and MOS. MOS is a built-in project of OBS. |
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": "cn-north-4",
"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
Last Article: Project Management
Next Article: Listing Projects
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.