forked from docs/doc-exports
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
53 lines
4.5 KiB
HTML
53 lines
4.5 KiB
HTML
<a name="ces_03_0057"></a><a name="ces_03_0057"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining a Project ID</h1>
|
|
<div id="body8662426"><div class="section" id="ces_03_0057__en-us_topic_0121673684_section1876711368114"><h4 class="sectiontitle">Scenarios</h4><p id="ces_03_0057__en-us_topic_0121673684_p177063681115">A project ID is required for some URLs when an API is called. Therefore, you need to obtain a project ID in advance. Two methods are available:</p>
|
|
<ul id="ces_03_0057__en-us_topic_0121673684_ul2770123611111"><li id="ces_03_0057__en-us_topic_0121673684_li157701436141116"><a href="#ces_03_0057__en-us_topic_0121673684_section86806471133">Obtain the Project ID by Calling an API</a></li><li id="ces_03_0057__en-us_topic_0121673684_li07701836121118"><a href="#ces_03_0057__en-us_topic_0121673684_section32975495318">Obtain the Project ID from the Console</a></li></ul>
|
|
</div>
|
|
<div class="section" id="ces_03_0057__en-us_topic_0121673684_section86806471133"><a name="ces_03_0057__en-us_topic_0121673684_section86806471133"></a><a name="en-us_topic_0121673684_section86806471133"></a><h4 class="sectiontitle">Obtain the Project ID by Calling an API</h4><p id="ces_03_0057__en-us_topic_0121673684_p31183326524">You can obtain the project ID by calling the IAM API used to query project information based on the specified criteria.</p>
|
|
<p id="ces_03_0057__en-us_topic_0121673684_p857314915139">The API used to obtain a project ID is GET https://{Endpoint}/v3/projects. {Endpoint} is the IAM endpoint and can be obtained from <a href="https://docs.otc.t-systems.com/regions-and-endpoints/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>. </p>
|
|
<p id="ces_03_0057__en-us_topic_0121673684_p3770181514218">The following is an example response. The value of <strong id="ces_03_0057__en-us_topic_0121673684_b842352706123544">id</strong> is the project ID.</p>
|
|
<pre class="screen" id="ces_03_0057__en-us_topic_0121673684_screen14199113161316">{
|
|
"projects": [
|
|
{
|
|
"domain_id": "65ewtrgaggshhk1223245sghjlse684b",
|
|
"is_domain": false,
|
|
"parent_id": "65ewtrgaggshhk1223245sghjlse684b",
|
|
"name": "project_name",
|
|
"description": "",
|
|
"links": {
|
|
"next": null,
|
|
"previous": null,
|
|
"self": "https://www.example.com/v3/projects/a4adasfjljaaaakla12334jklga9sasfg"
|
|
},
|
|
"id": "a4adasfjljaaaakla12334jklga9sasfg",
|
|
"enabled": true
|
|
}
|
|
],
|
|
"links": {
|
|
"next": null,
|
|
"previous": null,
|
|
"self": "https://www.example.com/v3/projects"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ces_03_0057__en-us_topic_0121673684_section32975495318"><a name="ces_03_0057__en-us_topic_0121673684_section32975495318"></a><a name="en-us_topic_0121673684_section32975495318"></a><h4 class="sectiontitle">Obtain a Project ID from the Console</h4><div class="p" id="ces_03_0057__en-us_topic_0121673684_p1356864351018">A project ID needs to be specified in the URIs of some APIs. Therefore, you need to obtain the project ID before calling APIs. The following procedure describes how to obtain a project ID:<ol id="ces_03_0057__en-us_topic_0121673684_ol7453556171010"><li id="ces_03_0057__en-us_topic_0121673684_li645315621018">Log in to the management console.</li><li id="ces_03_0057__en-us_topic_0121673684_li142001547118">Click the username and select <strong id="ces_03_0057__en-us_topic_0121673684_b10350181718117">My Credentials</strong> from the drop-down list.<p id="ces_03_0057__en-us_topic_0121673684_p13639183110119">On the <strong id="ces_03_0057__en-us_topic_0121673684_b19682129101113">My Credentials</strong> page, view project IDs in the project list.</p>
|
|
<div class="fignone" id="ces_03_0057__en-us_topic_0121673684_fig12841949131317"><span class="figcap"><b>Figure 1 </b>Viewing project IDs</span><br><span><img id="ces_03_0057__en-us_topic_0121673684_image1184449141315" src="en-us_image_0000001508295281.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
<p id="ces_03_0057__en-us_topic_0121673684_p55531521415">In multi-project scenarios, expand the region, and obtain your sub-project ID from the <strong id="ces_03_0057__en-us_topic_0121673684_b314916613146">Project ID</strong> column.</p>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ces_03_0053.html">Common Parameters</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |