doc-exports/docs/fg/api-ref/functiongraph_06_0260.html
Chen, Junjie cb4b0ade33 FG API 20240924 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2024-10-28 18:55:02 +00:00

42 lines
3.3 KiB
HTML

<a name="functiongraph_06_0260"></a><a name="functiongraph_06_0260"></a>
<h1 class="topictitle1">Obtaining a Project ID</h1>
<div id="body1525337991991"><div class="section" id="functiongraph_06_0260__section1554791617113"><h4 class="sectiontitle">Obtaining a Project ID on the Console</h4><p id="functiongraph_06_0260__p1092162219348">When calling APIs, you need to enter a project ID in some URLs. To obtain a project ID, perform the following steps:</p>
<ol id="functiongraph_06_0260__ol6921822193414"><li id="functiongraph_06_0260__li16921172283414">Log in to the management console.</li><li id="functiongraph_06_0260__li1092102217346">Click the username and choose <strong id="functiongraph_06_0260__b46958534218">My Credentials</strong> from the drop-down list.<p id="functiongraph_06_0260__p10400113316418">On the <strong id="functiongraph_06_0260__b195449421319">My Credentials</strong> page, view the project ID.</p>
</li></ol>
</div>
<div class="section" id="functiongraph_06_0260__section10510161913310"><h4 class="sectiontitle">Obtaining a Project ID by Calling an API</h4><p id="functiongraph_06_0260__p854441918313">A project ID can also be obtained by calling a specific API. For details, see <a href="https://docs.otc.t-systems.com/identity-access-management/api-ref/apis/project_management/querying_project_information_based_on_the_specified_criteria.html#en-us-topic-0057845625" target="_blank" rel="noopener noreferrer">Querying Project Information</a>.</p>
<p id="functiongraph_06_0260__p454414195320">The API used to obtain a project ID is <strong id="functiongraph_06_0260__b1274754494619">GET https://</strong><em id="functiongraph_06_0260__i174934444619">{Endpoint}</em><strong id="functiongraph_06_0260__b0750344104617">/v3/projects</strong>, where <em id="functiongraph_06_0260__i10751194415466">{Endpoint}</em> indicates the IAM endpoint. You can obtain the IAM endpoint 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 on API calling authentication, see <a href="functiongraph_06_0230.html">Authentication</a>.</p>
<p id="functiongraph_06_0260__p175441319830">The following is an example response. The value of <strong id="functiongraph_06_0260__b51821440488">id</strong> in the <strong id="functiongraph_06_0260__b7182144454819">projects</strong> section is the project ID.</p>
<pre class="codeblock" id="functiongraph_06_0260__codeblock1844294111347">{
"projects": [
{
"domain_id": "65382450e8f64ac0870cd180d14e684b",
"is_domain": false,
"parent_id": "65382450e8f64ac0870cd180d14e684b",
"name": "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>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="functiongraph_06_1300.html">Appendix</a></div>
</div>
</div>