doc-exports/docs/dis/api-ref/dis_02_0501.html
Xiong, Chen Xiao 83fa2f6615 DIS API 20230116 version
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Xiong, Chen Xiao <chenxiaoxiong@huawei.com>
Co-committed-by: Xiong, Chen Xiao <chenxiaoxiong@huawei.com>
2023-06-27 15:26:05 +00:00

43 lines
3.3 KiB
HTML

<a name="dis_02_0501"></a><a name="dis_02_0501"></a>
<h1 class="topictitle1">Obtaining a Project ID</h1>
<div id="body1558357284554"><div class="section" id="dis_02_0501__en-us_topic_0191815273_section1691341861315"><h4 class="sectiontitle">Obtaining a Project ID by Calling an API</h4><p id="dis_02_0501__en-us_topic_0191815273_p996711364120">You can obtain the project ID by calling the API<a href="https://docs.otc.t-systems.com/api/iam/en-us_topic_0057845625.html" target="_blank" rel="noopener noreferrer"> used to query project information</a>.</p>
<p id="dis_02_0501__en-us_topic_0191815273_p82371314564">The API used to obtain a project ID is GET <strong id="dis_02_0501__b1983601582711">https://{Endpoint}/v3/projects</strong>. <strong id="dis_02_0501__b68368152273">{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="dis_02_0517.html">Authentication</a>.</p>
<p id="dis_02_0501__en-us_topic_0191815273_p1461198134114">The following is an example response. The value of <strong id="dis_02_0501__b191120240588">id</strong> is the project ID. If multiple IDs are returned, obtain the desired project ID based on the actual region (name).</p>
<pre class="screen" id="dis_02_0501__en-us_topic_0191815273_screen676419149446">{
"projects": [
{
"domain_id": "65382450e8f64ac0870cd180d14e684b",
"is_domain": false,
"parent_id": "65382450e8f64ac0870cd180d14e684b",
"name": "region_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="dis_02_0501__en-us_topic_0191815273_section59621329127"><h4 class="sectiontitle">Obtaining a Project ID from the Console</h4><p id="dis_02_0501__en-us_topic_0191815273_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="dis_02_0501__en-us_topic_0191815273_ol8715914194127"><li id="dis_02_0501__en-us_topic_0191815273_li50056756194127">Log in to the management console.</li><li id="dis_02_0501__en-us_topic_0191815273_li2804809915217">Click the username and select <strong id="dis_02_0501__b69745424588">My Credentials</strong> from the drop-down list.<p id="dis_02_0501__en-us_topic_0191815273_p136772519449">On the <strong id="dis_02_0501__b642094525813">My Credentials</strong> page, view project IDs in the project list.</p>
</li></ol>
<div class="fignone" id="dis_02_0501__en-us_topic_0191815273_fig39324824103512"><span class="figcap"><b>Figure 1 </b>Viewing project IDs</span><br><span><img id="dis_02_0501__en-us_topic_0191815273_image538470016132" src="en-us_image_0191919629.jpg"></span></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dis_02_0500.html">Appendix</a></div>
</div>
</div>