forked from docs/doc-exports
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
44 lines
3.4 KiB
HTML
44 lines
3.4 KiB
HTML
<a name="gaussdb_10_0004"></a><a name="gaussdb_10_0004"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining a Project ID</h1>
|
|
<div id="body1526376873787"><div class="section" id="gaussdb_10_0004__section236911484369"><h4 class="sectiontitle">Scenarios</h4><p id="gaussdb_10_0004__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="gaussdb_10_0004__ul1938973714396"><li id="gaussdb_10_0004__li183897377391"><a href="#gaussdb_10_0004__section85791974381">Obtaining the Project ID by Calling an API</a></li><li id="gaussdb_10_0004__li11307945123915"><a href="#gaussdb_10_0004__section196091152113715">Obtain a Project ID from the Console</a></li></ul>
|
|
</div>
|
|
<div class="section" id="gaussdb_10_0004__section85791974381"><a name="gaussdb_10_0004__section85791974381"></a><a name="section85791974381"></a><h4 class="sectiontitle">Obtaining the Project ID by Calling an API</h4><p id="gaussdb_10_0004__p857314915139">The API used to obtain a project ID is <strong id="gaussdb_10_0004__b1126952992510">GET https://{Endpoint}/v3/projects</strong>. <strong id="gaussdb_10_0004__b32705291255">{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="gaussdb_03_0001.html">Authentication</a>.</p>
|
|
<p id="gaussdb_10_0004__p3770181514218">The following is an example response. The value of <strong id="gaussdb_10_0004__b1342435175018">id</strong> is the project ID.</p>
|
|
<pre class="screen" id="gaussdb_10_0004__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="gaussdb_10_0004__section196091152113715"><a name="gaussdb_10_0004__section196091152113715"></a><a name="section196091152113715"></a><h4 class="sectiontitle">Obtain a Project ID from the Console</h4><ol id="gaussdb_10_0004__ol3196144819145"><li id="gaussdb_10_0004__li1019624861412"><span>Register yourself on the management console and log in to it.</span></li><li id="gaussdb_10_0004__li119612486145"><span>Move your pointer over the username and select My Credentials in the displayed drop-down list.</span><p><p id="gaussdb_10_0004__p136772519449">On the <strong id="gaussdb_10_0004__b320864416157">My Credentials</strong> page, view project IDs in the project list.</p>
|
|
<div class="fignone" id="gaussdb_10_0004__fig39324824103512"><span class="figcap"><b>Figure 1 </b>Viewing project IDs</span><br><span><img id="gaussdb_10_0004__image1923101311271" src="en-us_image_0000001828922089.png"></span></div>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="gaussdb_10_0000.html">Appendix</a></div>
|
|
</div>
|
|
</div>
|
|
|