doc-exports/docs/apig/api-ref/apig-api-180713009.html
vladimirvshivkov cab615fbec Revert "APIG API 20240125 version"
Reviewed-by: Topchii, Maria <mtopchii@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: vladimirvshivkov <vshivkovvladimir@gmail.com>
Co-committed-by: vladimirvshivkov <vshivkovvladimir@gmail.com>
2024-11-05 10:39:48 +00:00

43 lines
3.2 KiB
HTML

<a name="apig-api-180713009"></a><a name="apig-api-180713009"></a>
<h1 class="topictitle1">Obtaining a Project ID</h1>
<div id="body1559099638399"><div class="section" id="apig-api-180713009__section414113577116"><h4 class="sectiontitle">Calling an API</h4><p id="apig-api-180713009__p184083580537">You can also obtain a project ID by calling the IAM API used to query project information.</p>
<p id="apig-api-180713009__p82371314564">The API used to obtain a project ID is "GET https://<em id="apig-api-180713009__i756894312434">{Endpoint}</em>/v3/projects/". <em id="apig-api-180713009__i1555814694311">{Endpoint}</em> is the IAM endpoint and can be obtained from technical support. For details on API calling authentication, see <a href="apig-api-190529268.html">Authentication</a>.</p>
<p id="apig-api-180713009__p1461198134114">The following is an example response. The value of <strong id="apig-api-180713009__b3237123414241">id</strong> in the <strong id="apig-api-180713009__b7237143482412">projects</strong> field is the project ID.</p>
<pre class="screen" id="apig-api-180713009__screen676419149446">{
"projects": [
{
"domain_id": "65382450e8f64ac0870cd180d14e684b",
"is_domain": false,
"parent_id": "65382450e8f64ac0870cd180d14e684b",
"name": "xx-north-4",
"description": "",
"links": {
"next": null,
"previous": null,
"self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99"
},
<strong id="apig-api-180713009__b2077122111311"> </strong><strong id="apig-api-180713009__b1377482117136">"id": "a4a5d4098fb4474fa22cd05f897d6b99",</strong>
"enabled": true
}
],
"links": {
"next": null,
"previous": null,
"self": "https://www.example.com/v3/projects"
}
}</pre>
</div>
<div class="section" id="apig-api-180713009__section15182163514118"><h4 class="sectiontitle">Obtaining a Project ID on the Console</h4><p id="apig-api-180713009__p474213232304">A project ID needs to be specified in the URLs of some APIs. Therefore, you need to obtain a project ID before calling such APIs. To obtain a project ID, perform the following operations:</p>
<ol id="apig-api-180713009__ol2742172313018"><li id="apig-api-180713009__li8742122315308">Log in to the management console.</li><li id="apig-api-180713009__li1774213232309">Hover the mouse pointer over the username, click the username, and choose <strong id="apig-api-180713009__b8519144043117">My Credentials</strong> from the drop-down list.<p id="apig-api-180713009__p1359527094640">On the <strong id="apig-api-180713009__b087718243227">My Credentials</strong> page, view project IDs in the project list.</p>
<p id="apig-api-180713009__p204091619102318">If there are multiple projects in one region, expand <strong id="apig-api-180713009__b136191453182510">Region</strong> and view subproject IDs in the <strong id="apig-api-180713009__b8620105316251">Project ID</strong> column.</p>
</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="apig-api-190529271.html">Appendix</a></div>
</div>
</div>