doc-exports/docs/iam/api-ref/en-us_topic_0066154567.html
zhangyue 3b5a58b1fe IAM API 2.0.38
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2022-10-26 04:31:24 +00:00

133 lines
10 KiB
HTML

<a name="en-us_topic_0066154567"></a><a name="en-us_topic_0066154567"></a>
<h1 class="topictitle1">Querying Information About a Specified Project</h1>
<div id="body1499771471794"><div class="section" id="en-us_topic_0066154567__section19935195953515"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0066154567__p592712019116">This API is used to query detailed information about a project based on the project ID.</p>
</div>
<div class="section" id="en-us_topic_0066154567__section1935145911357"><h4 class="sectiontitle">URI</h4><ul id="en-us_topic_0066154567__ul19351359173517"><li id="en-us_topic_0066154567__li193515915352">URI format<p id="en-us_topic_0066154567__p0935155913515"><a name="en-us_topic_0066154567__li193515915352"></a><a name="li193515915352"></a>GET /v3/projects/{project_id}</p>
</li><li id="en-us_topic_0066154567__li1395019586187">URI parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0066154567__table1893565913351" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0066154567__row09361359123517"><th align="left" class="cellrowborder" valign="top" width="22.207779222077793%" id="mcps1.3.2.2.2.1.1.5.1.1"><p id="en-us_topic_0066154567__p11936175963512"><strong id="en-us_topic_0066154567__b2465687218314">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.41785821417858%" id="mcps1.3.2.2.2.1.1.5.1.2"><p id="en-us_topic_0066154567__p16936115915351"><strong id="en-us_topic_0066154567__ac429376f11ae472b87ff4be326afb9d8_1">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.03789621037896%" id="mcps1.3.2.2.2.1.1.5.1.3"><p id="en-us_topic_0066154567__p17936145912357"><strong id="en-us_topic_0066154567__b10222588183127_1">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="35.33646635336466%" id="mcps1.3.2.2.2.1.1.5.1.4"><p id="en-us_topic_0066154567__p8936105919358"><strong id="en-us_topic_0066154567__b6981351183141">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0066154567__row1993655983519"><td class="cellrowborder" valign="top" width="22.207779222077793%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="en-us_topic_0066154567__p193655973518">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.41785821417858%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="en-us_topic_0066154567__p13936175953511">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="21.03789621037896%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="en-us_topic_0066154567__p1093614590357">String</p>
</td>
<td class="cellrowborder" valign="top" width="35.33646635336466%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="en-us_topic_0066154567__p109368599354">Project ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="en-us_topic_0066154567__section199361259143511"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0066154567__ul8936185915356"><li id="en-us_topic_0066154567__li17936259143511">Parameters in the request header
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0066154567__table693655912359" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0066154567__row393615592358"><th align="left" class="cellrowborder" valign="top" width="22.21%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0066154567__p1793645910353"><strong id="en-us_topic_0066154567__b31449777183441">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.15%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0066154567__p10937459173515"><strong id="en-us_topic_0066154567__ac429376f11ae472b87ff4be326afb9d8_3">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.15%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0066154567__p9937259113513"><strong id="en-us_topic_0066154567__b10222588183127_3">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="35.49%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0066154567__p129378597357"><strong id="en-us_topic_0066154567__b4615667118353">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0066154567__row693710598354"><td class="cellrowborder" valign="top" width="22.21%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0066154567__p493710593358">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="21.15%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0066154567__p3937165913358">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="21.15%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0066154567__p49375592351">String</p>
</td>
<td class="cellrowborder" valign="top" width="35.49%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0066154567__p193713595351">Authenticated token.</p>
</td>
</tr>
<tr id="en-us_topic_0066154567__row19373595350"><td class="cellrowborder" valign="top" width="22.21%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0066154567__p9937135912358">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="21.15%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0066154567__p8937155973512">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="21.15%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0066154567__p29371159103518">String</p>
</td>
<td class="cellrowborder" valign="top" width="35.49%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0066154567__p193795920356">Fill <strong id="en-us_topic_0066154567__b842352706161331">application/json;charset=utf8</strong> in this field.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<ul id="en-us_topic_0066154567__ul793755923513"><li id="en-us_topic_0066154567__li393895917358">Example request<p id="en-us_topic_0066154567__p993813599353"><a name="en-us_topic_0066154567__li393895917358"></a><a name="li393895917358"></a>Obtaining information about the project whose ID is project_id=619d3e78f61b4be68bc5aa0b59edcf7b</p>
<pre class="screen" id="en-us_topic_0066154567__screen13938165920356"><em id="en-us_topic_0066154567__i1293816595357"><em id="en-us_topic_0066154567__i1614445043716">curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -H "X-Auth-Token:$token" -X </em>GET https://sample.domain.com/v3/projects/619d3e78f61b4be68bc5aa0b59edcf7b</em></pre>
</li></ul>
<div class="section" id="en-us_topic_0066154567__section293813595352"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0066154567__ul6357445610450"><li id="en-us_topic_0066154567__li1518470610450">Example response</li></ul>
<pre class="screen" id="en-us_topic_0066154567__screen994055983516">{
"project": {
"is_domain": false,
"description": "",
"links": {
"self": "https://sample.domain.com/v3/projects/2e93d63d8d2249f5a4ac5e2c78586a6e"
},
"enabled": true,
"id": "2e93d63d8d2249f5a4ac5e2c78586a6e",
"parent_id": "44c0781c83484eb9a4a5d4d233522cea",
"domain_id": "44c0781c83484eb9a4a5d4d233522cea",
"name": "MOS" //Default project name of OBS
}
}</pre>
</div>
<div class="section" id="en-us_topic_0066154567__section594020590359"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0066154567__table179401559183514" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0066154567__row169401559133520"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.6.2.1.3.1.1"><p id="en-us_topic_0066154567__p5940155913353"><strong id="en-us_topic_0066154567__b13348955183548">Status Code</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.6.2.1.3.1.2"><p id="en-us_topic_0066154567__p1494035916353"><strong id="en-us_topic_0066154567__b3211761218363">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0066154567__row3942185963517"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.1 "><p id="en-us_topic_0066154567__p2942125933518">200</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.2 "><p id="en-us_topic_0066154567__p794285911357">The request is successful.</p>
</td>
</tr>
<tr id="en-us_topic_0066154567__row1494285920350"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.1 "><p id="en-us_topic_0066154567__p094295913357">400</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.2 "><p id="en-us_topic_0066154567__p14942135920353">The server failed to process the request.</p>
</td>
</tr>
<tr id="en-us_topic_0066154567__row14942185913516"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.1 "><p id="en-us_topic_0066154567__p994255919358">401</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.2 "><p id="en-us_topic_0066154567__p3942155993513">Authentication failed.</p>
</td>
</tr>
<tr id="en-us_topic_0066154567__row1494295910356"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.1 "><p id="en-us_topic_0066154567__p99421759203517">403</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.2 "><p id="en-us_topic_0066154567__p5942195912351">Access denied.</p>
</td>
</tr>
<tr id="en-us_topic_0066154567__row209421659163510"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.1 "><p id="en-us_topic_0066154567__p159428594358">404</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.2 "><p id="en-us_topic_0066154567__p1394295911357">The requested resource cannot be found.</p>
</td>
</tr>
<tr id="en-us_topic_0066154567__row3942859163516"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.1 "><p id="en-us_topic_0066154567__p894215993514">500</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.1.3.1.2 "><p id="en-us_topic_0066154567__p14942115963512">Internal server error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0057845642.html">Project Management</a></div>
</div>
</div>