forked from docs/doc-exports
Reviewed-by: Kabai, Zoltán Gábor <zoltan-gabor.kabai@t-systems.com> Co-authored-by: Wei, Hongmin <weihongmin1@huawei.com> Co-committed-by: Wei, Hongmin <weihongmin1@huawei.com>
181 lines
12 KiB
HTML
181 lines
12 KiB
HTML
<a name="iam_08_0013"></a><a name="iam_08_0013"></a>
|
|
|
|
<h1 class="topictitle1">Querying the MFA Device Information of a User</h1>
|
|
<div id="body1597737539339"><div class="section" id="iam_08_0013__section1846415183370"><h4 class="sectiontitle">Function</h4><p id="iam_08_0013__p105391618153715">This API can be used by the administrator to query the MFA device information of a specified user or used by a user to query their MFA device information.</p>
|
|
</div>
|
|
<div class="section" id="iam_08_0013__section846551803716"><h4 class="sectiontitle">URI</h4><p id="iam_08_0013__p12539618193717">GET /v3.0/OS-MFA/users/{user_id}/virtual-mfa-device</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0013__table1446518184371" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="iam_08_0013__row9539141863717"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="iam_08_0013__p18539618173713">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.2.3.2.5.1.2"><p id="iam_08_0013__p35391218163711">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="iam_08_0013__p1053920189375">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.3.2.5.1.4"><p id="iam_08_0013__p653901853710">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0013__row35398183373"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="iam_08_0013__p105391318183711">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.2.3.2.5.1.2 "><p id="iam_08_0013__p2053921814377">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="iam_08_0013__p253919186372">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.2.5.1.4 "><p id="iam_08_0013__p1453981817371">User ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_08_0013__section1446991883716"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0013__table19469131813376" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="iam_08_0013__row6539191813371"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="iam_08_0013__p75391618203718">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.2.2.5.1.2"><p id="iam_08_0013__p1653931812370">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="iam_08_0013__p0539131811378">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.2.5.1.4"><p id="iam_08_0013__p15540518123714">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0013__row1754091815377"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_08_0013__p3540191823716">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.5.1.2 "><p id="iam_08_0013__p19540151883720">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_08_0013__p254041814370">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_08_0013__p12540171819379">A token with <strong id="iam_08_0013__b0275175613442">Security Administrator</strong> permissions is required if the administrator is requesting to query the MFA device information of a specified user.</p>
|
|
<p id="iam_08_0013__p165401188378">If a user is requesting to query their MFA device information, the user token (no special permission requirements) of the user is required.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_08_0013__section6474318103711"><h4 class="sectiontitle">Response Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0013__table947571883710" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters in the response body</caption><thead align="left"><tr id="iam_08_0013__row1540518133716"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.1"><p id="iam_08_0013__p3540161883714">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.2"><p id="iam_08_0013__p7540518143717">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.2.2.4.1.3"><p id="iam_08_0013__p16540151853715">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0013__row8540818203715"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.1 "><p id="iam_08_0013__p18540161853711"><a href="#iam_08_0013__table64771918103713">virtual_mfa_device</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.2 "><p id="iam_08_0013__p1954001883710">object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.2.2.4.1.3 "><p id="iam_08_0013__p13540191873718">Virtual MFA device information.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="iam_08_0013__table64771918103713"></a><a name="table64771918103713"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0013__table64771918103713" frame="border" border="1" rules="all"><caption><b>Table 4 </b>virtual_mfa_device</caption><thead align="left"><tr id="iam_08_0013__row12540518123715"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="iam_08_0013__p10540111817377">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="iam_08_0013__p2540118103714">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="iam_08_0013__p75401618173712">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0013__row854012181377"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_08_0013__p954011843711">serial_number</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_08_0013__p185407185371">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_08_0013__p854091863717">Virtual MFA device serial number.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0013__row354061843717"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_08_0013__p155401818163711">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_08_0013__p6540161812370">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_08_0013__p1054061813373">User ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_08_0013__section5480318193718"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="iam_08_0013__screen1654061820375">GET https://sample.domain.com/v3.0/OS-MFA/users/{user_id}/virtual-mfa-device</pre>
|
|
</div>
|
|
<div class="section" id="iam_08_0013__section1748091810373"><h4 class="sectiontitle">Example Response</h4><p id="iam_08_0013__p45401418103710"><strong id="iam_08_0013__b1552433911819">Status code: 200</strong></p>
|
|
<p id="iam_08_0013__p1554091812370">The request is successful.</p>
|
|
<pre class="screen" id="iam_08_0013__screen125402187371">{
|
|
"virtual_mfa_device" :
|
|
{
|
|
"user_id" : "16b26081f43d4c628c4bb88cf32e9...",
|
|
"serial_number" : "iam/mfa/16b26081f43d4c628c4bb88cf32e9..."
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<p id="iam_08_0013__p3267184282217"><strong id="iam_08_0013__b1154641181816">Status code: 403</strong></p>
|
|
<p id="iam_08_0013__p1126774211228">Access denied.</p>
|
|
<ul id="iam_08_0013__ul1426784292210"><li id="iam_08_0013__li22671842182216">Example 1</li></ul>
|
|
<pre class="screen" id="iam_08_0013__screen1654234918221">{
|
|
"error_msg" : "You are not authorized to perform the requested action.",
|
|
"error_code" : "IAM.0002"
|
|
}</pre>
|
|
<ul id="iam_08_0013__ul1068995020228"><li id="iam_08_0013__li1268945032212">Example 2</li></ul>
|
|
<pre class="screen" id="iam_08_0013__screen49001654182218">{
|
|
"error_msg" : "Policy doesn't allow %(actions)s to be performed.",
|
|
"error_code" : "IAM.0003"
|
|
}</pre>
|
|
<p id="iam_08_0013__p226819422226"><strong id="iam_08_0013__b114071461189">Status code: 404</strong></p>
|
|
<p id="iam_08_0013__p4268134214228">The requested resource cannot be found.</p>
|
|
<pre class="screen" id="iam_08_0013__screen1426819420226">{
|
|
"error_msg" : "Could not find %(target)s: %(target_id)s.",
|
|
"error_code" : "IAM.0004"
|
|
}</pre>
|
|
<p id="iam_08_0013__p11268104222218"><strong id="iam_08_0013__b20501951201818">Status code: 500</strong></p>
|
|
<p id="iam_08_0013__p62684425223">Internal server error.</p>
|
|
<pre class="screen" id="iam_08_0013__screen182681842142215">{
|
|
"error_msg" : "An unexpected error prevented the server from fulfilling your request.",
|
|
"error_code" : "IAM.0006"
|
|
}</pre>
|
|
<div class="section" id="iam_08_0013__section1348331893719"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0013__table194836186370" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_08_0013__row2540181814377"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.19.2.1.3.1.1"><p id="iam_08_0013__p195402187374">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.19.2.1.3.1.2"><p id="iam_08_0013__p0540131819373">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_08_0013__row9540121893718"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_08_0013__p4540318193712">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_08_0013__p1854019180374">The request is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0013__row115401418163713"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_08_0013__p65407183374">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_08_0013__p4540121817374">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0013__row165401318173712"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_08_0013__p75408184372">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_08_0013__p6540131812373">Access denied.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0013__row25400184373"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_08_0013__p75412184374">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_08_0013__p25411118203711">The requested resource cannot be found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_08_0013__row20541418193718"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_08_0013__p954118188372">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_08_0013__p185411218153711">Internal server error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="iam_02_0020.html">Security Settings</a></div>
|
|
</div>
|
|
</div>
|
|
|