Obtaining a Project ID and Name
Scenario
When you call an API, the project ID or name must be specified in some requests. The obtaining method is as follows:
Obtaining a Project ID and Name from the Console
To obtain the project ID (project_id) from the console, follow these steps:
- Log in to the management console.
- Hover over the username in the upper-right corner and select My Credentials from the drop-down list. Figure 1 My Credentials

- On the API Credentials page, the value in the Project ID column is the project ID, and the value in the Project Name column is the project name. Figure 2 Viewing a project ID


If there are multiple projects in one region, expand Region and view subproject IDs in the Project ID column.
Obtaining a Project ID by Calling an API
A project ID can be obtained by calling a specific API. For details, see Querying Project Information Based on the Specified Criteria.
The API for obtaining a project ID is GET https://{iam-endpoint}/v3/projects. {iam-endpoint} can be obtained from Regions and Endpoints.
The following is an example response. For example, if MaaS is deployed in the cn-southwest-2 region, the value of name in the response body is cn-southwest-2. The value of id under projects is the project ID.
{
"projects": [
{
"domain_id": "878991804cdc4ba597ae1403bdb******",
"is_domain": false,
"parent_id": "878991804cdc4ba597ae1403bd******",
"name": "cn-southwest-2",
"description": "",
"links": {
"next": null,
"previous": null,
"self": "https://iam.cn-southwest-2.myhuaweicloud.com/v3/projects/8d6c92e4e2d14ae685a697adfe******"
},
"id": "8d6c92e4e2d14ae685a697adfe******",
"enabled": true
},
],
"links": {
"next": null,
"previous": null,
"self": "https://iam.cn-southwest-2.myhuaweicloud.com/v3/projects?domain_id=878991804cdc4ba597ae1403bd******"
}
} 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
