doc-exports/docs/dws/api-ref/dws_02_0011.html
Lu, Huayi b974c4b77e DWS API 2022101001 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2022-12-12 18:34:53 +00:00

49 lines
3.5 KiB
HTML

<a name="EN-US_TOPIC_0000001180324307"></a><a name="EN-US_TOPIC_0000001180324307"></a>
<h1 class="topictitle1">Obtaining a Project ID</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001180324307__section1691341861315"><h4 class="sectiontitle">Obtaining a Project ID by Calling the API</h4><p id="EN-US_TOPIC_0000001180324307__p17202369450">You can obtain the project ID by calling the IAM API used to query project information based on the specified criteria.</p>
<p id="EN-US_TOPIC_0000001180324307__p82371314564">The API used to obtain a project ID is <strong id="EN-US_TOPIC_0000001180324307__b19783014473">GET https://{</strong><em id="EN-US_TOPIC_0000001180324307__i2097811024715">Endpoint</em><strong id="EN-US_TOPIC_0000001180324307__b797913011477">}/v3/projects/</strong>. {<em id="EN-US_TOPIC_0000001180324307__i89797016472">Endpoint</em>} indicates the IAM endpoint and can be obtained from "Regions and Endpoints". For details about API authentication, see <a href="dws_02_0064.html">Authentication</a>.</p>
<p id="EN-US_TOPIC_0000001180324307__p1461198134114">The following is an example response. The value of <strong id="EN-US_TOPIC_0000001180324307__b16167660476">id</strong> of <strong id="EN-US_TOPIC_0000001180324307__b51727644714">projects</strong> indicates the project ID.</p>
<pre class="screen" id="EN-US_TOPIC_0000001180324307__screen676419149446">{
"projects": [
{
"domain_id": "65382450e8f64ac0870cd180d14e684b",
"is_domain": false,
"parent_id": "65382450e8f64ac0870cd180d14e684b",
"name": "eu-de-01",
"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="EN-US_TOPIC_0000001180324307__section59621329127"><h4 class="sectiontitle">Obtaining a Project ID from the Console</h4><p id="EN-US_TOPIC_0000001180324307__p8112855194115">A project ID is required for some URLs when an API is called. To obtain a project ID, perform the following operations:</p>
<ol id="EN-US_TOPIC_0000001180324307__ol8715914194127"><li id="EN-US_TOPIC_0000001180324307__li50056756194127">Log in to the management console.</li><li id="EN-US_TOPIC_0000001180324307__li2804809915217">Click the username and select <strong id="EN-US_TOPIC_0000001180324307__b1152113276479">My Credential</strong> from the drop-down list.<p id="EN-US_TOPIC_0000001180324307__p136772519449">On the <strong id="EN-US_TOPIC_0000001180324307__b144471432144720">My Credential</strong> page, view the project ID in the project list.</p>
</li></ol>
<div class="fignone" id="EN-US_TOPIC_0000001180324307__fig39324824103512"><span class="figcap"><b>Figure 1 </b>Viewing project IDs</span><br><span><img id="EN-US_TOPIC_0000001180324307__image538470016132" src="figure/en-us_image_0000001180324341.jpg" height="161.19600000000003" width="465.53325" title="Click to enlarge" class="imgResize"></span></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_02_0066.html">Appendix</a></div>
</div>
</div>
<script language="JavaScript">
<!--
image_size('.imgResize');
var msg_imageMax = "view original image";
var msg_imageClose = "close";
//--></script>