doc-exports/docs/dis/api-ref/dis_02_0501.html
gtema 6bc123a554 Reimplementation of docs/doc-exports#263
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: gtema <artem.goncharov@gmail.com>
Co-committed-by: gtema <artem.goncharov@gmail.com>
2022-11-11 12:03:08 +00:00

49 lines
3.6 KiB
HTML

<a name="dis_02_0501"></a><a name="dis_02_0501"></a>
<h1 class="topictitle1">Obtaining a Project ID</h1>
<div id="body0000001238192617"><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 a project ID by calling the API for <a href="https://docs.otc.t-systems.com/api/iam/en-us_topic_0057845625.html" target="_blank" rel="noopener noreferrer">Querying Project Information Based on the Specified Criteria</a>.</p>
<p id="dis_02_0501__en-us_topic_0191815273_p82371314564">The API for obtaining the project ID is <strong id="dis_02_0501__b12767162017585">GET https://{Endpoint}/v3/projects/</strong>, where <em id="dis_02_0501__i1976817207588">Endpoint</em> indicates the endpoint of IAM. You can obtain the endpoint 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_0000001238312593.jpg" title="Click to enlarge" class="imgResize"></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>
<script language="JavaScript">
<!--
image_size('.imgResize');
var msg_imageMax = "view original image";
var msg_imageClose = "close";
//--></script>