A project ID or project name is required in some API requests. You need to obtain the project ID and name before calling an API.

The API for obtaining a project ID is GET https://{iam-endpoint}/v3/projects. {iam-endpoint} indicates the endpoint of IAM, which can be obtained from Endpoints.
{
"projects": [
{
"domain_id": "65382450e8f64ac0870cd180d14exxxx",
"is_domain": false,
"parent_id": "65382450e8f64ac0870cd180d14exxxx",
"name": "xxx", //Project name, the name of the deployment zone.
"description": "",
"links": {
"next": null,
"previous": null,
"self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897dxxxx"
},
"id": "a4a5d4098fb4474fa22cd05f897dxxxx", //Project ID
"enabled": true
}
],
"links": {
"next": null,
"previous": null,
"self": "https://www.example.com/v3/projects"
}
}