forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com> Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
41 lines
3.4 KiB
HTML
41 lines
3.4 KiB
HTML
<a name="css_03_0071"></a><a name="css_03_0071"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining a Project ID and Name</h1>
|
|
<div id="body8662426"><p id="css_03_0071__p194391501803">A project ID or project name is required in some API requests. You need to obtain the project ID and name before calling an API.</p>
|
|
<div class="section" id="css_03_0071__section05453179582"><h4 class="sectiontitle">Obtaining a Project ID and Name from the Console</h4><ol id="css_03_0071__ol1454591705812"><li id="css_03_0071__li17545201725812">Log in to the console.</li><li id="css_03_0071__li7493103385418">In the upper right corner of the page, click the username and choose <span class="parmname" id="css_03_0071__parmname1463852561418"><b>My Credentials</b></span> from the drop-down list. The <strong id="css_03_0071__b7644132514148">My Credentials</strong> page is displayed.</li><li id="css_03_0071__li15162020201811">In the project list, view the <strong id="css_03_0071__b1936431912218">Project ID</strong> and <strong id="css_03_0071__b944514314213">Project Name</strong>.<div class="fignone" id="css_03_0071__fig267017206014"><span class="figcap"><b>Figure 1 </b>Viewing the project ID and name</span><br><span><img id="css_03_0071__image167013201204" src="en-us_image_0000001342150645.png"></span></div>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="css_03_0071__section16546101713583"><h4 class="sectiontitle">Obtaining a Project ID by Calling an API</h4><p id="css_03_0071__p175461217105811">The API for obtaining a project ID is <strong id="css_03_0071__b6741121815245">GET https://</strong><em id="css_03_0071__i2509162182418">{iam-endpoint}</em><strong id="css_03_0071__b9837723102418">/v3/projects</strong>. <em id="css_03_0071__i1437102719246">{iam-endpoint}</em> indicates the endpoint of IAM, which can be obtained from <a href="css_03_0053.html">Endpoints</a>.</p>
|
|
<div class="p" id="css_03_0071__p10546171713589">The following is an example response. For example, if CSS is deployed in region <span class="parmvalue" id="css_03_0071__parmvalue10857173452320"><b>xxx</b></span>, the value of <strong id="css_03_0071__b79613215336">name</strong> in the response body is <span class="parmvalue" id="css_03_0071__parmvalue941611413236"><b>xxx</b></span>. The value of <strong id="css_03_0071__b466591273411">id</strong> in <span class="parmname" id="css_03_0071__parmname731816204247"><b>projects</b></span> is the project ID.<pre class="screen" id="css_03_0071__screen145460171580">{
|
|
"projects": [
|
|
{
|
|
"domain_id": "65382450e8f64ac0870cd180d14exxxx",
|
|
"is_domain": false,
|
|
"parent_id": "65382450e8f64ac0870cd180d14exxxx",
|
|
"name": "xxx", //Project name, the name of the deployment zone.
|
|
"description": "",
|
|
"links": {
|
|
"next": null,
|
|
"previous": null,
|
|
"self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897dxxxx"
|
|
},
|
|
<strong id="css_03_0071__b48671158142017">"id": "a4a5d4098fb4474fa22cd05f897dxxxx",</strong> //Project ID
|
|
"enabled": true
|
|
}
|
|
],
|
|
"links": {
|
|
"next": null,
|
|
"previous": null,
|
|
"self": "https://www.example.com/v3/projects"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_03_0040.html">Common Parameters</a></div>
|
|
</div>
|
|
</div>
|
|
|