forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
43 lines
3.2 KiB
HTML
43 lines
3.2 KiB
HTML
<a name="mrs_02_0011"></a><a name="mrs_02_0011"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining a Project ID</h1>
|
|
<div id="body1559185429881"><div class="section" id="mrs_02_0011__section964292414404"><h4 class="sectiontitle">Obtaining a Project ID from the Management Console</h4><p id="mrs_02_0011__p1472416044213">A project ID (<strong id="mrs_02_0011__b947619341604">project_id</strong>) is required for some URLs when an API is called. To obtain a project ID, perform the following operations:</p>
|
|
<ol id="mrs_02_0011__ol172412004213"><li id="mrs_02_0011__li1772412012422">Log in to the management console.</li><li id="mrs_02_0011__li3724190124219">Click the username and choose <strong id="mrs_02_0011__b1714318271634">My Credentials</strong> from the drop-down list.<p id="mrs_02_0011__p47241906429">On the <strong id="mrs_02_0011__b19239184819115">My Credentials</strong> page, view project IDs in the project list.</p>
|
|
</li></ol>
|
|
<p id="mrs_02_0011__p748044519418">If there are multiple projects in one region, expand <strong id="mrs_02_0011__b36307239217">Region</strong> and view subproject IDs in the <strong id="mrs_02_0011__b1463242319212">Project ID</strong> column.</p>
|
|
</div>
|
|
<div class="section" id="mrs_02_0011__section199243176407"><h4 class="sectiontitle">Obtaining a Project ID by Calling an API</h4><p id="mrs_02_0011__p188021379593">You can obtain the project ID by calling the IAM API used to query project information based on the specified criteria.</p>
|
|
<p id="mrs_02_0011__p5924317194011">The API used to obtain a project ID is <strong id="mrs_02_0011__b1628111114378">GET https://</strong><em id="mrs_02_0011__i1262911115377">{Endpoint}</em><strong id="mrs_02_0011__b10629161116372">/v3/projects</strong>. <em id="mrs_02_0011__i176294111370">{Endpoint}</em> 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>. For details about API authentication, see <a href="mrs_02_0009.html">Authentication</a>.</p>
|
|
<p id="mrs_02_0011__p11925101711406">The following is an example response. The value of <strong id="mrs_02_0011__b1921338123016">id</strong> under <strong id="mrs_02_0011__b19933381303">projects</strong> is the project ID of the region specified by <strong id="mrs_02_0011__b329762511172">name</strong>.</p>
|
|
<pre class="screen" id="mrs_02_0011__screen199253174407">{
|
|
"projects": [
|
|
{
|
|
"domain_id": "65382450e8f64ac0870cd180d14e684b",
|
|
"is_domain": false,
|
|
"parent_id": "65382450e8f64ac0870cd180d14e684b",
|
|
"name": "<em id="mrs_02_0011__i3261144419261">region_id</em>",
|
|
"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>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_9002.html">Appendix</a></div>
|
|
</div>
|
|
</div>
|
|
|