doc-exports/docs/cts/api-ref/cts_api_0005.html
Liu, Siying 61db61b4e5 CTS API 20230612 version.
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com>
Co-authored-by: Liu, Siying <liusiying@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-committed-by: Liu, Siying <liusiying@noreply.gitea.eco.tsi-dev.otc-service.com>
2024-04-18 10:17:02 +00:00

41 lines
3.2 KiB
HTML

<a name="cts_api_0005"></a><a name="cts_api_0005"></a>
<h1 class="topictitle1">Obtaining an Account ID and Project ID</h1>
<div id="body8662426"><div class="section" id="cts_api_0005__en-us_topic_0181155953_section046535519448"><h4 class="sectiontitle">Obtaining Account and Project IDs from the Console</h4><p id="cts_api_0005__en-us_topic_0181155953_p888116724510">Account ID (<strong id="cts_api_0005__en-us_topic_0181155953_b8401106175320">domain-id</strong>) and project ID are required for some URLs when an API is called. You can perform the following operations to obtain these IDs:</p>
</div>
<ol id="cts_api_0005__en-us_topic_0181155953_ol19669195292012"><li id="cts_api_0005__en-us_topic_0181155953_li766912521205">Log in to the management console. Hover the mouse pointer over the username and choose <strong id="cts_api_0005__en-us_topic_0181155953_b9661020142013">My Credentials</strong> from the drop-down list.</li><li id="cts_api_0005__en-us_topic_0181155953_li196691352182017">On the <strong id="cts_api_0005__en-us_topic_0181155953_b198411313115417">My Credentials</strong> page, view the account and project IDs.</li></ol>
<p id="cts_api_0005__en-us_topic_0181155953_p136691526208">If there are multiple projects in one region, expand <strong id="cts_api_0005__en-us_topic_0181155953_b88141912181716">Region</strong> and view sub-project IDs from the <strong id="cts_api_0005__en-us_topic_0181155953_b854632534810">Project ID</strong> column.</p>
<div class="section" id="cts_api_0005__en-us_topic_0181155953_section1691341861315"><h4 class="sectiontitle">Obtaining Project IDs by Calling an API</h4><p id="cts_api_0005__en-us_topic_0181155953_p82371314564">The API for obtaining a project ID is <strong id="cts_api_0005__en-us_topic_0181155953_b1743119314211">GET https://</strong><em id="cts_api_0005__en-us_topic_0181155953_i17401173072120">{Endpoint}</em><strong id="cts_api_0005__en-us_topic_0181155953_b415713652113">/v3/projects</strong>. <em id="cts_api_0005__en-us_topic_0181155953_i14765124132118">{Endpoint}</em> indicates the endpoint of IAM.</p>
<p id="cts_api_0005__en-us_topic_0181155953_p1461198134114">In the following example, <strong id="cts_api_0005__en-us_topic_0181155953_b2582112022211">id</strong> indicates a project ID.</p>
<pre class="screen" id="cts_api_0005__en-us_topic_0181155953_screen676419149446">{
"projects": [
{
"domain_id": "65382450e8f64ac0870cd180xxxx",
"is_domain": false,
"parent_id": "65382450e8f64ac0870cd180d1xxxx",
"name": "xx-region-1",
"description": "",
"links": {
"next": null,
"previous": null,
"self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f89xxxx"
},
<strong id="cts_api_0005__en-us_topic_0181155953_b13120747164712">"id": "a4a5d4098fb4474fa22cd0xxxx",</strong>
"enabled": true
}
],
"links": {
"next": null,
"previous": null,
"self": "https://www.example.com/v3/projects"
}
}</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="cts_api_0020.html">Appendix</a></div>
</div>
</div>