forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Sheng, Lichang <lichangsheng1@noreply.gitea.eco.tsi-dev.otc-service.com> Co-committed-by: Sheng, Lichang <lichangsheng1@noreply.gitea.eco.tsi-dev.otc-service.com>
49 lines
4.3 KiB
HTML
49 lines
4.3 KiB
HTML
<a name="ocr_03_0130"></a><a name="ocr_03_0130"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining the Project ID</h1>
|
|
<div id="body0000001744551757"><p id="ocr_03_0130__p111177316711">A project ID or project name is required in some API requests. You need to obtain the project ID and name before calling an API.</p>
|
|
<div class="section" id="ocr_03_0130__section7551831710"><h4 class="sectiontitle">Obtaining a Project ID and Name from the Console</h4><ol id="ocr_03_0130__ol511763172"><li id="ocr_03_0130__li111171338719">Log in to the management console.</li><li id="ocr_03_0130__li12117131471">In the upper right corner of the page, click the username and choose <strong id="ocr_03_0130__b3492489819">My Credentials</strong> from the drop-down list. The <strong id="ocr_03_0130__b192041843783">My Credentials</strong> page is displayed.</li><li id="ocr_03_0130__li131171832071">In the project list, view <strong id="ocr_03_0130__b113083822375810">Project ID</strong> and <strong id="ocr_03_0130__b54913464375810">Project Name</strong>.<div class="fignone" id="ocr_03_0130__fig183321429143613"><span class="figcap"><b>Figure 1 </b>Viewing the project ID and name</span><br><span><img id="ocr_03_0130__image83324291368" src="en-us_image_0000001750904201.png" height="121.85460000000002" width="492.1" title="Click to enlarge" class="imgResize"></span></div>
|
|
<p id="ocr_03_0130__p640014136568">If there are multiple projects, unfold the target region and obtain the project ID from the <strong id="ocr_03_0130__b3150104861015">Project ID</strong> column.</p>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="ocr_03_0130__section0671636717"><h4 class="sectiontitle">Obtaining a Project ID by Calling an API</h4><p id="ocr_03_0130__p41181830717">You can obtain a project ID by calling the API used to <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" target="_blank" rel="noopener noreferrer">query project information based on the specified criteria</a>.</p>
|
|
<p id="ocr_03_0130__p811820311715">The API for obtaining a project ID is <strong id="ocr_03_0130__b3854104161116">GET https://</strong><em id="ocr_03_0130__i785544111116">{iam-endpoint}</em><strong id="ocr_03_0130__b7855144131120">/v3/projects</strong>. <em id="ocr_03_0130__i78551941131112">{iam-endpoint}</em> indicates the endpoint of IAM, which can be obtained from <a href="ocr_03_0062.html">Endpoint</a>. For details about how to obtain the IAM endpoint, see <a href="ocr_03_0005.html">Authentication</a>.</p>
|
|
<p id="ocr_03_0130__p151196320718">The following is an example response. For example, if OCR is deployed in the <strong id="ocr_03_0130__b1128714489127">xxx</strong> region, the value of <strong id="ocr_03_0130__b1728814489128">name</strong> in the response body is <strong id="ocr_03_0130__b1528824851210">xxx</strong>. The value of <strong id="ocr_03_0130__b1128864891212">id</strong> in <strong id="ocr_03_0130__b5288124841215">projects</strong> is the project ID. If there are multiple projects, unfold the target region and obtain the project ID from the <strong id="ocr_03_0130__b16506183011137">Project ID</strong> column.</p>
|
|
<pre class="screen" id="ocr_03_0130__screen51201539715">{
|
|
"projects": [
|
|
{
|
|
"domain_id": "65382450e8f64ac0870cd180d14exxxx",
|
|
"is_domain": false,
|
|
"parent_id": "65382450e8f64ac0870cd180d14exxxx",
|
|
"name": "xxx", // Project name, which is the name of the deployment region.
|
|
"description": "",
|
|
"links": {
|
|
"next": null,
|
|
"previous": null,
|
|
"self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897dxxxx"
|
|
},
|
|
<strong id="ocr_03_0130__b104966399575810">"id": "a4a5d4098fb4474fa22cd05f897dxxxx",</strong> // Project ID
|
|
"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="ocr_03_0048.html">Common Parameters</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |