doc-exports/docs/dms/api-ref/kafka-api-0036212547.html
Chen, Junjie f5b629cc78 DMS API 20240722 version
Reviewed-by: Ziuzko, Stanislav <stanislav.ziuzko@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2024-09-06 09:17:23 +00:00

47 lines
4.4 KiB
HTML

<a name="kafka-api-0036212547"></a><a name="kafka-api-0036212547"></a>
<h1 class="topictitle1">Obtaining a Project ID</h1>
<div id="body1526975966044"><div class="section" id="kafka-api-0036212547__section136545262478"><h4 class="sectiontitle">Scenario</h4><p id="kafka-api-0036212547__p1556115614615">A project ID is required for some URLs when an API is called. Obtain a project ID using either of the following methods:</p>
<ul id="kafka-api-0036212547__ul7963113144712"><li id="kafka-api-0036212547__li3757103814464"><a href="#kafka-api-0036212547__en-us_topic_0128036884_section2871183975310">Obtaining a Project ID by Calling an API</a></li><li id="kafka-api-0036212547__li1296373184719"><a href="#kafka-api-0036212547__en-us_topic_0128036884_section1948011550474">Obtaining a Project ID on the Console</a></li></ul>
</div>
<div class="section" id="kafka-api-0036212547__en-us_topic_0128036884_section2871183975310"><a name="kafka-api-0036212547__en-us_topic_0128036884_section2871183975310"></a><a name="en-us_topic_0128036884_section2871183975310"></a><h4 class="sectiontitle">Obtaining a Project ID by Calling an API</h4><p id="kafka-api-0036212547__p31183326524">You can obtain a project ID by calling the IAM API used to query projects based on specified criteria.</p>
<p id="kafka-api-0036212547__en-us_topic_0128036884_p118724395535">The API used to obtain a project ID is <strong id="kafka-api-0036212547__b1339350195311">GET https://</strong><em id="kafka-api-0036212547__i193915025313">{Endpoint}</em><strong id="kafka-api-0036212547__b163919505534">/v3/projects</strong>, where <em id="kafka-api-0036212547__i84010503537">{Endpoint}</em> indicates the IAM endpoint. You can obtain the IAM endpoint from <a href="https://docs.otc.t-systems.com/additional/endpoints.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>. </p>
<p id="kafka-api-0036212547__en-us_topic_0128036884_p18872839115314">The following is an example response. The value of <strong id="kafka-api-0036212547__b823345182514">id</strong> in the <strong id="kafka-api-0036212547__b19635185612516">projects</strong> section is the project ID:</p>
<pre class="screen" id="kafka-api-0036212547__en-us_topic_0128036884_screen128738393538">{
"projects": [
{
"domain_id": "65382450e8f64ac0870cd180d14e684b",
"is_domain": false,
"parent_id": "65382450e8f64ac0870cd180d14e684b",
"name": "xxx-xxx-xxx",
"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="kafka-api-0036212547__en-us_topic_0128036884_section1948011550474"><a name="kafka-api-0036212547__en-us_topic_0128036884_section1948011550474"></a><a name="en-us_topic_0128036884_section1948011550474"></a><h4 class="sectiontitle">Obtaining a Project ID on the Console</h4><p id="kafka-api-0036212547__en-us_topic_0128036884_p2998115714719">A project ID is required for some URLs when an API is called. You can obtain a project ID on the console.</p>
<p id="kafka-api-0036212547__en-us_topic_0128036884_p1957212514818">The following procedure describes how to obtain a project ID:</p>
<ol id="kafka-api-0036212547__en-us_topic_0128036884_ol12293201731915"><li id="kafka-api-0036212547__en-us_topic_0128036884_li112931917181917"><span>Log in to the management console.</span></li><li id="kafka-api-0036212547__en-us_topic_0128036884_li162931917101919"><span>Click the username and choose <strong id="kafka-api-0036212547__b752216147116">My Credentials</strong> from the drop-down list.</span><p><p id="kafka-api-0036212547__p89837532213">On the <strong id="kafka-api-0036212547__b136601145121916">API Credentials</strong> page, view project IDs in the project list.</p>
<div class="fignone" id="kafka-api-0036212547__fig682593116016"><span class="figcap"><b>Figure 1 </b>Viewing a project ID</span><br><span><img id="kafka-api-0036212547__image20242103833114" src="en-us_image_0000001862808485.png"></span></div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="kafka-api-180514011.html">Appendix</a></div>
</div>
</div>