forked from docs/doc-exports
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com> Co-authored-by: Ru, Li Yi <liyiru7@huawei.com> Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
44 lines
3.3 KiB
HTML
44 lines
3.3 KiB
HTML
<a name="rds_03_0002"></a><a name="rds_03_0002"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining a Project ID</h1>
|
|
<div id="body1526376873787"><div class="section" id="rds_03_0002__section236911484369"><h4 class="sectiontitle">Scenarios</h4><p id="rds_03_0002__p8112855194115">When calling APIs, you need to specify the project ID in some URLs. To do so, you need to obtain the project ID first. Two methods are available:</p>
|
|
<ul id="rds_03_0002__ul1938973714396"><li id="rds_03_0002__li183897377391"><a href="#rds_03_0002__section85791974381">Obtaining the Project ID by Calling an API</a></li><li id="rds_03_0002__li11307945123915"><a href="#rds_03_0002__section196091152113715">Obtain a Project ID from the Console</a></li></ul>
|
|
</div>
|
|
<div class="section" id="rds_03_0002__section85791974381"><a name="rds_03_0002__section85791974381"></a><a name="section85791974381"></a><h4 class="sectiontitle">Obtaining the Project ID by Calling an API</h4><p id="rds_03_0002__p857314915139">The API used to obtain a project ID is <strong id="rds_03_0002__b6269145015550">GET https://{Endpoint}/v3/projects/</strong>. <strong id="rds_03_0002__b1754910177566">{Endpoint}</strong> is the IAM endpoint and can be obtained from <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>. For details about API authentication, see <a href="rds_03_0001.html">Authentication</a>.</p>
|
|
<p id="rds_03_0002__p3770181514218">The following is an example response. The value of <strong id="rds_03_0002__b1342435175018">id</strong> is the project ID.</p>
|
|
<pre class="screen" id="rds_03_0002__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="rds_03_0002__section196091152113715"><a name="rds_03_0002__section196091152113715"></a><a name="section196091152113715"></a><h4 class="sectiontitle">Obtain a Project ID from the Console</h4><ol id="rds_03_0002__ol3196144819145"><li id="rds_03_0002__li1019624861412"><span>Register yourself on the management console and log in to it.</span></li><li id="rds_03_0002__li119612486145"><span>Move your pointer over the username and select My Credentials in the displayed drop-down list.</span><p><p id="rds_03_0002__p136772519449">On the <strong id="rds_03_0002__b320864416157">My Credentials</strong> page, view project IDs in the project list.</p>
|
|
<div class="fignone" id="rds_03_0002__fig39324824103512"><span class="figcap"><b>Figure 1 </b>Viewing project IDs</span><br><span><img id="rds_03_0002__image538470016132" src="en-us_image_0000001127708398.jpg"></span></div>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rds_01_0010.html">Appendix</a></div>
|
|
</div>
|
|
</div>
|
|
|