forked from docs/modelarts
![otcbot[bot]](/assets/img/avatar_default.png)
Changes to ma_api from doc-exports#14 This is an automatically created Pull Request for changes to ma_api in opentelekomcloud-docs/doc-exports#14. Please do not edit it manually, since update to the original PR will overwrite local changes. Original patch file, as well as complete rst archive, can be found in the artifacts of the opentelekomcloud-docs/doc-exports#14 Reviewed-by: Beibei <None>
2.3 KiB
2.3 KiB
- original_name
modelarts_03_0147.html
Obtaining a Project ID
Scenarios
A project ID is required for some requests when an API is called. Therefore, obtain the project ID before calling the API. Use either of the following methods:
Obtaining a Project ID from the Console <modelarts_03_0147__en-us_topic_0171436477_section1747620762418>
Obtaining a Project ID by Calling an API <modelarts_03_0147__en-us_topic_0171436477_section3926171216207>
Obtaining a Project ID from the Console
To do so, perform the following operations:
- Log in to the console.
- In the upper right corner, click your account avatar icon and choose My Settings from the drop-down list.
- On the My Settings page, go to the Project List tab page, which is displayed by default. View the project ID in the project list.
Obtaining a Project ID by Calling an API
The API for obtaining a project ID is GET https://{iam-endpoint}/v3/projects. To obtain {iam-endpoint}, see Request URI <modelarts_03_0005__en-us_topic_0129435569_en-us_topic_0170917207_en-us_topic_0168405763_section1849899574>
Endpoints <modelarts_03_0141>
.
The following is an example response. For example, if ModelArts is deployed in the xxx region, the value of name in the response body is xxx. The value of id in projects is the project ID.
{
"projects": [{
"domain_id": "65382450e8f64ac0870cd180d14e684b",
"is_domain": false,
"parent_id": "65382450e8f64ac0870cd180d14e684b",
"name": "xxx",
"description": "",
"links": {
"next": null,
"previous": null,
"self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99"
},
"id": "a4a5d4098fb4474fa22cd05f897d6b99",
"enabled": true
}],
"links": {
"next": null,
"previous": null,
"self": "https://www.example.com/v3/projects"
}
}