forked from docs/doc-exports
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
43 lines
3.0 KiB
HTML
43 lines
3.0 KiB
HTML
<a name="dcs-api-0312045"></a><a name="dcs-api-0312045"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining a Project ID</h1>
|
|
<div id="body14920772"><div class="section" id="dcs-api-0312045__section1691341861315"><h4 class="sectiontitle">Obtaining a Project ID by Calling an API</h4><p id="dcs-api-0312045__p996711364120">You can obtain a project ID by calling the API used to query project information based on the specified criteria.</p>
|
|
<p id="dcs-api-0312045__p82371314564">The API used to obtain a project ID is <strong id="dcs-api-0312045__b22842057970">GET https://{<em id="dcs-api-0312045__i1928412574718">Endpoint</em>}/v3/projects</strong>. {Endpoint} is the IAM endpoint and can be obtained from <a href="https://docs.otc.t-systems.com/additional/endpoints.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>. </p>
|
|
<p id="dcs-api-0312045__p1461198134114">The following is an example response. The value of <strong id="dcs-api-0312045__b1886792210549">id</strong> in the <strong id="dcs-api-0312045__b7449104914548">projects</strong> section is the project ID.</p>
|
|
<pre class="screen" id="dcs-api-0312045__screen676419149446">{
|
|
"projects": [
|
|
{
|
|
"domain_id": "65382450e8f64ac0870cd180d14e684b",
|
|
"is_domain": false,
|
|
"parent_id": "65382450e8f64ac0870cd180d14e684b",
|
|
"name": "project_name",
|
|
"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="dcs-api-0312045__section751154684517"><h4 class="sectiontitle">Obtaining a Project ID from the Console</h4><p id="dcs-api-0312045__p10337259154513">A project ID is required for some URLs when an API is called.</p>
|
|
<p id="dcs-api-0312045__p15108127174618">To obtain a project ID, perform the following operations:</p>
|
|
<ol id="dcs-api-0312045__ol12293201731915"><li id="dcs-api-0312045__li112931917181917"><span>Sign up and log in to the management console.</span></li><li id="dcs-api-0312045__li9293191711910"><span>Click the username in the upper right corner and choose <strong id="dcs-api-0312045__b825912475817">My Credentials</strong> from the drop-down list.</span></li><li id="dcs-api-0312045__li1581813311906"><span>On the <strong id="dcs-api-0312045__b1650314352527">My Credentials</strong> page, view project IDs in the project list.</span><p><div class="fignone" id="dcs-api-0312045__fig682593116016"><span class="figcap"><b>Figure 1 </b>Viewing project IDs</span><br><span><img id="dcs-api-0312045__image16825231808" src="en-us_image_0216824199.jpg"></span></div>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-api-0312042.html">Appendix</a></div>
|
|
</div>
|
|
</div>
|
|
|