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.
Debugging
You can debug this API in API Explorer.
URI
GET /v3/projects
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
domain_id |
No |
String |
Account ID of the 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 ap-southeast-1 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 |
Access token issued to a user to bear its identity and permissions. For details about the permissions required by the token, see Actions. |
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. If the previous resource link is unavailable, this parameter is set to null. |
next |
String |
Next resource link. If the next resource link is unavailable, this parameter is set to null. |
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 ap-southeast-1 project. |
domain_id |
String |
Account ID of the project. |
name |
String |
Project name. For example, ap-southeast-1 and MOS. MOS is a built-in project of OBS. |
Example Request
Request for querying project information
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-1", "description": "", "links": { "next": null, "previous": null, "self": "https://iam.myhuaweicloud.com/v3/projects/06f1c15e6f0010672f86c003006c5f17" }, "id": "06f1c15e6f0010672f86c00300...", "enabled": true }, { "domain_id": "d78cbac186b744899480f25bd...", "is_domain": false, "parent_id": "d78cbac186b744899480f25bd0...", "name": "", "description": "", "links": { "next": null, "previous": null, "self": "https://iam.myhuaweicloud.com/v3/projects/065a7c66da0010992ff7c0031e5a..." }, "id": "065a7c66da0010992ff7c0031e5a...", "enabled": true } ], "links": { "next": null, "previous": null, "self": "https://iam.myhuaweicloud.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
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot