doc-exports/docs/cce/api-ref/cce_02_0341.html
Dong, Qiu Jian 3336ba8df7 CCE API for v1.23
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
2022-11-10 12:48:59 +00:00

50 lines
3.4 KiB
HTML

<a name="cce_02_0341"></a><a name="cce_02_0341"></a>
<h1 class="topictitle1">Obtaining a Project ID</h1>
<div id="body1563873350768"><div class="section" id="cce_02_0341__section1691341861315"><h4 class="sectiontitle">Obtaining the Project ID by Calling an API</h4><p id="cce_02_0341__p996711364120">You can obtain the project ID by calling the API <a href="https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845625.html" target="_blank" rel="noopener noreferrer">used to query project information based on the specified criteria</a>.</p>
<p id="cce_02_0341__p177571552165618">The API used to obtain a project ID is <strong id="cce_02_0341__b79632047347">GET https://</strong><em id="cce_02_0341__i1196416473412">{Endpoint}</em><strong id="cce_02_0341__b79669471643">/v3/projects</strong>, where <em id="cce_02_0341__i596713471441">{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="cce_02_0341__p1461198134114">The following is an example response. The value of <strong id="cce_02_0341__b011212141351">id</strong> in the <strong id="cce_02_0341__b811317141755">projects</strong> field is the project ID.</p>
<pre class="screen" id="cce_02_0341__screen676419149446">{
"projects": [
{
"domain_id": "65382450e8f64ac0870cd180d14e684b",
"is_domain": false,
"parent_id": "65382450e8f64ac0870cd180d14e684b",
"name": "xxxxxxxx",
"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="cce_02_0341__section14547182915611"><h4 class="sectiontitle">Obtaining a Project ID from the Console</h4><p id="cce_02_0341__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="cce_02_0341__ol18261426154413"><li id="cce_02_0341__li13261162614443"><span>Log in to the management console.</span></li><li id="cce_02_0341__li15262182617448"><span>Click the username and choose <strong id="cce_02_0341__b44121123226">My Credential</strong><strong id="cce_02_0341__b15819624184212">s</strong> from the drop-down list.</span><p><p id="cce_02_0341__p136772519449">On the <strong id="cce_02_0341__b12195162342215">My Credentials</strong> page, view project IDs in the project list.</p>
<div class="p" id="cce_02_0341__p1189841611813"><div class="fignone" id="cce_02_0341__fig555610358190"><span class="figcap"><b>Figure 1 </b>Obtaining the Project ID</span><br><span><img id="cce_02_0341__image35566355192" src="en-us_image_0203982368.png" title="Click to enlarge" class="imgResize"></span></div>
</div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="cce_02_0083.html">Appendix</a></div>
</div>
</div>
<script language="JavaScript">
<!--
image_size('.imgResize');
var msg_imageMax = "view original image";
var msg_imageClose = "close";
//--></script>