Files
doc-exports/docs/asm/api-ref/asm_api_0019.html
qiujiandong1 0a1983aa72 ASM API initial version 20240430
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
2025-03-10 11:27:25 +00:00

42 lines
2.9 KiB
HTML

<a name="asm_api_0019"></a><a name="asm_api_0019"></a>
<h1 class="topictitle1">Obtaining a Project ID</h1>
<div id="body1555402084056"><div class="section" id="asm_api_0019__section414113577116"><h4 class="sectiontitle">Obtaining a Project ID by Calling an API</h4><p id="asm_api_0019__p316610218817">A project ID can be obtained by calling a specific API. For details, see <a href="https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845625.html" target="_blank" rel="noopener noreferrer">Querying Project Information Based on the Specified Criteria</a>.</p>
<p id="asm_api_0019__p177571552165618">The API used to obtain a project ID is <strong id="asm_api_0019__b178585383442423">GET https://</strong><em id="asm_api_0019__i190037548642423">{Endpoint}</em><strong id="asm_api_0019__b49196448442423">/v3/projects/</strong>, where <em id="asm_api_0019__i95883835342423">{Endpoint}</em> indicates the IAM endpoint. You can obtain the IAM endpoint from <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
<p id="asm_api_0019__p1461198134114">In the following example, <strong id="asm_api_0019__b893961492019">id</strong> indicates the project ID.</p>
<pre class="screen" id="asm_api_0019__screen676419149446">{
"projects": [
{
"domain_id": "65382450e8f64ac0870cd180d14e684b",
"is_domain": false,
"parent_id": "65382450e8f64ac0870cd180d14e684b",
"name": "eu-de",
"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"
}
}</pre>
</div>
<div class="section" id="asm_api_0019__section15182163514118"><h4 class="sectiontitle">Obtaining a Project ID from the Console</h4><p id="asm_api_0019__p8112855194115">A project ID is required for some URLs when an API is called. To obtain a project ID, perform the following operations:</p>
<ol id="asm_api_0019__ol8715914194127"><li id="asm_api_0019__li50056756194127">Log in to the management console.</li><li id="asm_api_0019__li4130312894059">Click the username and select <strong id="asm_api_0019__b3717155511209">My Credentials</strong> from the drop-down list. On the <strong id="asm_api_0019__b127416372014">API Credentials</strong> page, view the project ID in the project list.</li></ol>
<p id="asm_api_0019__p204091619102318">If a project contains multiple sub-projects, click the plus (+) sign to view sub-project IDs.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="asm_api_0016.html">Appendix</a></div>
</div>
</div>