doc-exports/docs/iam/api-ref/en-us_topic_0057845595.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

162 lines
12 KiB
HTML

<a name="en-us_topic_0057845595"></a><a name="en-us_topic_0057845595"></a>
<h1 class="topictitle1">Querying the List of Projects Accessible to Federated Users</h1>
<div id="body1492741255668"><div class="section" id="en-us_topic_0057845595__section5828421916512"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0057845595__p971723413231">This API is used to query the list of projects accessible to federated users. The project list is used to obtain the scoped token in federated identity authentication mode.</p>
</div>
<div class="section" id="en-us_topic_0057845595__section826961192054"><h4 class="sectiontitle">URI</h4><p id="en-us_topic_0057845595__p1477350519215">GET /v3/OS-FEDERATION/projects</p>
</div>
<div class="section" id="en-us_topic_0057845595__section4822038116512"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0057845595__ul437175819358"><li id="en-us_topic_0057845595__li163705863510">Parameters in the request header
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845595__table1353674916512" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845595__row2490362916512"><th align="left" class="cellrowborder" valign="top" width="20.44%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0057845595__p392808116512"><strong id="en-us_topic_0057845595__a6f95694edbbb43d8a152536754b86c82">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.9%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0057845595__p4973910816512"><strong id="en-us_topic_0057845595__a105e6ed8c3de4c5a9dde97ae5a71071e_1">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.09%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0057845595__p233598516512"><strong id="en-us_topic_0057845595__a703d34a49a2f4162bc1a1a439f655f95_1">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.57%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0057845595__p5499708616512"><strong id="en-us_topic_0057845595__a76acf34e8e7b48948763ec1b460ad92f">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845595__row2557896316512"><td class="cellrowborder" valign="top" width="20.44%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845595__p5863013716512">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="18.9%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845595__p5142066316512">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.09%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845595__p432421416512">String</p>
</td>
<td class="cellrowborder" valign="top" width="42.57%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845595__p1471708616512">Unscoped token. For details about how to obtain a token, see <a href="en-us_topic_0057845629.html">Obtaining an Unscoped Token (SP Initiated)</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="en-us_topic_0057845595__note35722793181354"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="en-us_topic_0057845595__p53069686181354">The API described in <a href="en-us_topic_0057845558.html">Querying the List of Projects Accessible to Users</a> is recommended. This API returns the same response format as the API described in this section.</p>
</div></div>
</li></ul>
<ul id="en-us_topic_0057845595__ul5123330216512"><li id="en-us_topic_0057845595__li5844653516512">Example request<pre class="screen" id="en-us_topic_0057845595__screen5625677416512"><em id="en-us_topic_0057845595__i1482263817353">GET /v3/OS-FEDERATION/projects</em></pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0057845595__section6050485516512"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0057845595__ul2315687116512"><li id="en-us_topic_0057845595__li44652357193912">Parameters in the response body
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845595__table13331867193912" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845595__row24511618193912"><th align="left" class="cellrowborder" valign="top" width="20.62%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="en-us_topic_0057845595__p57442782193912"><strong id="en-us_topic_0057845595__b28097194105329">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.759999999999998%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="en-us_topic_0057845595__p22353756193912"><strong id="en-us_topic_0057845595__a105e6ed8c3de4c5a9dde97ae5a71071e_3">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.360000000000003%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="en-us_topic_0057845595__p65823815193912"><strong id="en-us_topic_0057845595__a703d34a49a2f4162bc1a1a439f655f95_3">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.26%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="en-us_topic_0057845595__p30128774193912"><strong id="en-us_topic_0057845595__b28042497105329">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845595__row6434223193912"><td class="cellrowborder" valign="top" width="20.62%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845595__p39284002193912">projects</p>
</td>
<td class="cellrowborder" valign="top" width="18.759999999999998%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845595__p27887566193912">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.360000000000003%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845595__p44300399193912">array</p>
</td>
<td class="cellrowborder" valign="top" width="42.26%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845595__p31562605193912">List of projects.</p>
</td>
</tr>
<tr id="en-us_topic_0057845595__row28187440193912"><td class="cellrowborder" valign="top" width="20.62%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845595__p57908014193912">links</p>
</td>
<td class="cellrowborder" valign="top" width="18.759999999999998%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845595__p60037521193912">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.360000000000003%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845595__p31201070193912">Object</p>
</td>
<td class="cellrowborder" valign="top" width="42.26%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845595__p44258731193912">Project resource link.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0057845595__li15854151203510">Example response<pre class="screen" id="en-us_topic_0057845595__screen19949513871">{
"links": {
"self": "https://<em id="en-us_topic_0057845595__i797174715918">sample.domain.com</em>/v3/OS-FEDERATION/projects",
"previous": null,
"next": null
},
"projects": [
{
"is_domain": false,
"description": "",
"links": {
"self": "https://<em id="en-us_topic_0057845595__i81705591198">sample.domain.com</em>/v3/projects/05cf683c351e43518618d9fa96a5efa9"
},
"enabled": true,
"id": "05cf683c351e43518618d9fa96a5efa9",
"parent_id": "e31ac82d778b4d128cb6fed37fd72cdb",
"domain_id": "e31ac82d778b4d128cb6fed37fd72cdb",
"name": "region_name"
},
{
"is_domain": false,
"description": "",
"links": {
"self": "https://<em id="en-us_topic_0057845595__i5105108100">sample.domain.com</em>/v3/projects/32b56f108f87418e8219317beb0fff3c"
},
"enabled": true,
"id": "32b56f108f87418e8219317beb0fff3c",
"parent_id": "e31ac82d778b4d128cb6fed37fd72cdb",
"domain_id": "e31ac82d778b4d128cb6fed37fd72cdb",
"name": "MOS" //Default project name of OBS
}
]
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0057845595__section3776874116512"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845595__table3936921516512" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845595__row6177659016512"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0057845595__p3784787616512"><strong id="en-us_topic_0057845595__b37151362163018">Status Code</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.2"><p id="en-us_topic_0057845595__p4577915216512"><strong id="en-us_topic_0057845595__b38470707163018">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845595__row1712379916512"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845595__p4485049916512">200</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845595__p901183616512">The request is successful.</p>
</td>
</tr>
<tr id="en-us_topic_0057845595__row1399766516512"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845595__p6006904716512">400</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845595__p3375463816512">The server failed to process the request.</p>
</td>
</tr>
<tr id="en-us_topic_0057845595__row3535628916512"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845595__p4528716416512">401</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845595__p4438164316512">Authentication failed.</p>
</td>
</tr>
<tr id="en-us_topic_0057845595__row6389047016512"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845595__p774555116512">403</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845595__p2340985616512">Access denied.</p>
</td>
</tr>
<tr id="en-us_topic_0057845595__row936211516512"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845595__p2013387616512">405</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845595__p2023129816512">The method specified in the request is not allowed for the requested resource.</p>
</td>
</tr>
<tr id="en-us_topic_0057845595__row4786395916512"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845595__p5177548316512">413</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845595__p3306455816512">The request entity is too large.</p>
</td>
</tr>
<tr id="en-us_topic_0057845595__row2914557416512"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845595__p1198130216512">500</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845595__p3096138616512">Internal server error.</p>
</td>
</tr>
<tr id="en-us_topic_0057845595__row1021702116512"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845595__p2227238716512">503</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845595__p5923292916512">Service unavailable.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0057845643.html">Project</a></div>
</div>
</div>