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

204 lines
15 KiB
HTML

<a name="en-us_topic_0057845574"></a><a name="en-us_topic_0057845574"></a>
<h1 class="topictitle1">Querying the List of Domains Accessible to Users</h1>
<div id="body1492670576123"><div class="section" id="en-us_topic_0057845574__section1161918016535"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0057845574__p162951016535">This API is used to query the list of domains accessible to users.</p>
</div>
<div class="section" id="en-us_topic_0057845574__section1466559616535"><h4 class="sectiontitle">URI</h4><p id="en-us_topic_0057845574__p35104473192156">GET /v3/auth/domains</p>
</div>
<div class="section" id="en-us_topic_0057845574__section3946061516535"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0057845574__ul7251683193726"><li id="en-us_topic_0057845574__li24550423193726">Parameters in the request header
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845574__table42709864193734" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845574__row51079856193734"><th align="left" class="cellrowborder" valign="top" width="18.4981501849815%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0057845574__p49087560193734"><strong id="en-us_topic_0057845574__a6f95694edbbb43d8a152536754b86c82_1">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.75812418758124%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0057845574__p16669439193734"><strong id="en-us_topic_0057845574__a105e6ed8c3de4c5a9dde97ae5a71071e_1">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.02809719028097%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0057845574__p8047347193734"><strong id="en-us_topic_0057845574__a703d34a49a2f4162bc1a1a439f655f95_1">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.71562843715628%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0057845574__p47855371193734"><strong id="en-us_topic_0057845574__b810139469113029_1">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845574__row13774939193734"><td class="cellrowborder" valign="top" width="18.4981501849815%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845574__p43827657193734">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="18.75812418758124%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845574__p60379327193734">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.02809719028097%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845574__p58887289193734">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.71562843715628%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845574__p5141087193734">Authenticated token.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0057845574__ul5002493316535"><li id="en-us_topic_0057845574__li4757121416535">Example request<pre class="screen" id="en-us_topic_0057845574__screen2548774216535"><em id="en-us_topic_0057845574__i1940824017015">curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -H "X-Auth-Token:$token" -X GET https://sample.domain.com/v3/auth/domains</em></pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0057845574__section2806308616535"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0057845574__ul1793614919419"><li id="en-us_topic_0057845574__li3039350619419">Parameters in the response body
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845574__table5851746616535" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845574__row4874364216535"><th align="left" class="cellrowborder" valign="top" width="18.39%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="en-us_topic_0057845574__p5592089316535"><strong id="en-us_topic_0057845574__b57918781164846">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.58%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="en-us_topic_0057845574__p3329852216535"><strong id="en-us_topic_0057845574__a105e6ed8c3de4c5a9dde97ae5a71071e_3">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.03%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="en-us_topic_0057845574__p1282575116535"><strong id="en-us_topic_0057845574__a703d34a49a2f4162bc1a1a439f655f95_3">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="en-us_topic_0057845574__p3225289216535"><strong id="en-us_topic_0057845574__b311754837113113">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845574__row6234747416535"><td class="cellrowborder" valign="top" width="18.39%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845574__p1698064016535">domains</p>
</td>
<td class="cellrowborder" valign="top" width="18.58%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845574__p3325463916535">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.03%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845574__p29011544433">JSONArray</p>
</td>
<td class="cellrowborder" valign="top" width="44%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845574__p1277547116535">List of domains.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row4787037616535"><td class="cellrowborder" valign="top" width="18.39%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845574__p5229527616535">links</p>
</td>
<td class="cellrowborder" valign="top" width="18.58%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845574__p805896416535">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.03%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845574__p6681742833">JSON object</p>
</td>
<td class="cellrowborder" valign="top" width="44%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845574__p6019115416535">Domain resource link.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0057845574__ul196606210511"><li id="en-us_topic_0057845574__li186601525516">Description for the domain format
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845574__table466092157" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845574__row206601826516"><th align="left" class="cellrowborder" valign="top" width="18.33%" id="mcps1.3.4.3.1.1.1.5.1.1"><p id="en-us_topic_0057845574__p1466015211510"><strong id="en-us_topic_0057845574__a6f95694edbbb43d8a152536754b86c82_3">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.65%" id="mcps1.3.4.3.1.1.1.5.1.2"><p id="en-us_topic_0057845574__p466011211514"><strong id="en-us_topic_0057845574__a105e6ed8c3de4c5a9dde97ae5a71071e_5">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.78%" id="mcps1.3.4.3.1.1.1.5.1.3"><p id="en-us_topic_0057845574__p15660192453"><strong id="en-us_topic_0057845574__a703d34a49a2f4162bc1a1a439f655f95_5">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.24%" id="mcps1.3.4.3.1.1.1.5.1.4"><p id="en-us_topic_0057845574__p4661021358"><strong id="en-us_topic_0057845574__b810139469113029_3">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845574__row166611125517"><td class="cellrowborder" valign="top" width="18.33%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845574__p15661125513">enabled</p>
</td>
<td class="cellrowborder" valign="top" width="18.65%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845574__p36611123514">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.78%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845574__p16611521653">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="44.24%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845574__p8661426513">Whether a domain is enabled. <strong id="en-us_topic_0057845574__b842352706184851">true</strong> indicates that the domain is enabled. <strong id="en-us_topic_0057845574__b842352706184924">false</strong> indicates that the domain is disabled. The default value is <strong id="en-us_topic_0057845574__b602514205184952">true</strong>.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row6661228518"><td class="cellrowborder" valign="top" width="18.33%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845574__p146611021152">id</p>
</td>
<td class="cellrowborder" valign="top" width="18.65%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845574__p5661726511">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.78%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845574__p206612023516">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.24%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845574__p46611321856">Domain ID.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row106611821556"><td class="cellrowborder" valign="top" width="18.33%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845574__p86615219518">name</p>
</td>
<td class="cellrowborder" valign="top" width="18.65%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845574__p14661324520">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.78%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845574__p86611921650">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.24%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845574__p10661625511">Domain name.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row8661202259"><td class="cellrowborder" valign="top" width="18.33%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845574__p1566112218518">links</p>
</td>
<td class="cellrowborder" valign="top" width="18.65%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845574__p1766118215512">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.78%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845574__p672913371135">JSON object</p>
</td>
<td class="cellrowborder" valign="top" width="44.24%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845574__p7661021352">Domain resource link.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row10311535481"><td class="cellrowborder" valign="top" width="18.33%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845574__p1231123510810">description</p>
</td>
<td class="cellrowborder" valign="top" width="18.65%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845574__p13117357817">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.78%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845574__p1432035781">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.24%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845574__p153263511815">Domain description.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0057845574__ul484947816535"><li id="en-us_topic_0057845574__li4364530416535">Example response<pre class="screen" id="en-us_topic_0057845574__screen18159647192431">{
"domains": [{
"description": "desc of domain",
"enabled": true,
"id": "37ef61",
"links": {
"self": "https://sample.domain.com/v3/domains/37ef61"
},
"name": "my domain"
}],
"links": {
"self": "https://sample.domain.com/v3/auth/domains",
"previous": null,
"next": null
}
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0057845574__section4586962016535"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845574__table2445171616535" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845574__row220522216535"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0057845574__p4440527916535"><strong id="en-us_topic_0057845574__b842352706183134">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_0057845574__p4005784516535"><strong id="en-us_topic_0057845574__b1087815409113153">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845574__row2345998316535"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845574__p2121045316535">200</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845574__p4032516916535">The request is successful.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row2738220116535"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845574__p336583816535">400</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845574__p419748416535">The server failed to process the request.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row3777735716535"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845574__p4006708216535">401</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845574__p2420822816535">Authentication failed.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row1654746316535"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845574__p6527611816535">403</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845574__p5287423016535">Access denied.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row610602816535"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845574__p2482624816535">405</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845574__p6476903216535">The method specified in the request is not allowed for the requested resource.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row4605037716535"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845574__p3909305116535">413</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845574__p1242054916535">The request entity is too large.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row4467608316535"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845574__p6199298116535">500</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845574__p5537558816535">Internal server error.</p>
</td>
</tr>
<tr id="en-us_topic_0057845574__row2861824716535"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845574__p3637670816535">503</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845574__p6083222516535">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_0057845621.html">Tenant Management</a></div>
</div>
</div>