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

193 lines
15 KiB
HTML

<a name="en-us_topic_0057845616"></a><a name="en-us_topic_0057845616"></a>
<h1 class="topictitle1">Querying a Protocol</h1>
<div id="body1492676120181"><div class="section" id="en-us_topic_0057845616__section41911953102858"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0057845616__p10721154918205">This API is used to query the information about a protocol.</p>
</div>
<div class="section" id="en-us_topic_0057845616__section19280869102858"><h4 class="sectiontitle">URI</h4><ul id="en-us_topic_0057845616__ul18246518102858"><li id="en-us_topic_0057845616__li30000937102858">URI format<p id="en-us_topic_0057845616__p1572984102858"><a name="en-us_topic_0057845616__li30000937102858"></a><a name="li30000937102858"></a>GET /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id}</p>
</li></ul>
<ul id="en-us_topic_0057845616__ul14156858102858"><li id="en-us_topic_0057845616__li60302866102858">URI parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845616__table5854888102858" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845616__row27160337102858"><th align="left" class="cellrowborder" valign="top" width="21.02%" id="mcps1.3.2.3.1.1.1.5.1.1"><p id="en-us_topic_0057845616__p52503678102858"><strong id="en-us_topic_0057845616__b37426530113629">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.7%" id="mcps1.3.2.3.1.1.1.5.1.2"><p id="en-us_topic_0057845616__p24939507102858"><strong id="en-us_topic_0057845616__b842352706112524">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.43%" id="mcps1.3.2.3.1.1.1.5.1.3"><p id="en-us_topic_0057845616__p6834201102858"><strong id="en-us_topic_0057845616__b84235270615026">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.85%" id="mcps1.3.2.3.1.1.1.5.1.4"><p id="en-us_topic_0057845616__p16699415102858"><strong id="en-us_topic_0057845616__b14438018113629">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845616__row10475414102858"><td class="cellrowborder" valign="top" width="21.02%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845616__p43202238102858">idp_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.7%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845616__p9720374102858">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.43%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845616__p49152806102858">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.85%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845616__p21954359102858">ID of an identity provider.</p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row63371507102858"><td class="cellrowborder" valign="top" width="21.02%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845616__p32818456102858">protocol _id</p>
</td>
<td class="cellrowborder" valign="top" width="17.7%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845616__p41049265102858">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.43%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845616__p36656167102858">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.85%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845616__p16359521102858">ID of a protocol. </p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="en-us_topic_0057845616__section50052807102858"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0057845616__ul27745603102858"><li id="en-us_topic_0057845616__li48383835102858">Parameters in the request header
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845616__table32801338102858" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845616__row13061250102858"><th align="left" class="cellrowborder" valign="top" width="21.052105210521052%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0057845616__p51328329102858"><strong id="en-us_topic_0057845616__b4912712714504">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.6017601760176%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0057845616__p63953976102858"><strong id="en-us_topic_0057845616__b29624837144946_1">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.45174517451745%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0057845616__p12889592102858"><strong id="en-us_topic_0057845616__b41850847145016">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.89438943894389%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0057845616__p37424049102858"><strong id="en-us_topic_0057845616__b46355523145025">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845616__row11449098102858"><td class="cellrowborder" valign="top" width="21.052105210521052%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845616__p54961707102858">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="17.6017601760176%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845616__p22713277102858">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.45174517451745%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845616__p27836135102858">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.89438943894389%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845616__p40134482102858">Fill <strong id="en-us_topic_0057845616__b842352706161331">application/json;charset=utf8</strong> in this field.</p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row25666023102858"><td class="cellrowborder" valign="top" width="21.052105210521052%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845616__p65682006102858">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="17.6017601760176%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845616__p18642265102858">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.45174517451745%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845616__p33628505102858">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.89438943894389%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845616__p51645192143514">Authenticated token.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0057845616__li59042578203243">Example request<pre class="screen" id="en-us_topic_0057845616__screen2956678210321"><em id="en-us_topic_0057845616__i158217961514">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/OS-FEDERATION/identity_providers/ACME/protocols/saml</em></pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0057845616__section49786990102858"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0057845616__ul6214355102858"><li id="en-us_topic_0057845616__li55929196102858">Parameters in the response body
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845616__table33600724102858" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845616__row58807483102858"><th align="left" class="cellrowborder" valign="top" width="21.17788221177882%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="en-us_topic_0057845616__p65785692102858"><strong id="en-us_topic_0057845616__b61512370145115">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.708229177082295%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="en-us_topic_0057845616__p27040837102858"><strong id="en-us_topic_0057845616__b29624837144946_3">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.328267173282672%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="en-us_topic_0057845616__p42824223102858"><strong id="en-us_topic_0057845616__b34844838145052">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.785621437856214%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="en-us_topic_0057845616__p46210066102858"><strong id="en-us_topic_0057845616__b2854729314514">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845616__row52027845102858"><td class="cellrowborder" valign="top" width="21.17788221177882%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845616__p53505888102858">id</p>
</td>
<td class="cellrowborder" valign="top" width="17.708229177082295%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845616__p39009676102858">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.328267173282672%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845616__p5667184102858">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.785621437856214%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845616__p56388789102858">ID of a protocol. </p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row37737059102858"><td class="cellrowborder" valign="top" width="21.17788221177882%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845616__p36802972102858">mapping_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.708229177082295%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845616__p28250761102858">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.328267173282672%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845616__p6610323102858">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.785621437856214%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845616__p65674145102858">Mapping ID.</p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row54196397102858"><td class="cellrowborder" valign="top" width="21.17788221177882%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845616__p27832061102858">links</p>
</td>
<td class="cellrowborder" valign="top" width="17.708229177082295%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845616__p39804486102858">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.328267173282672%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845616__p2937903102858">Object</p>
</td>
<td class="cellrowborder" valign="top" width="43.785621437856214%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845616__p36643552102858">Protocol resource link.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0057845616__li4969348253">Example response<pre class="screen" id="en-us_topic_0057845616__screen15679307111653">{
"protocol": {
"id": "saml",
"links": {
"identity_provider": "https://example.com/v3/OS-FEDERATION/identity_providers/ACME",
"self": "https://example.com/v3/OS-FEDERATION/identity_providers/ACME/protocols/saml"
},
"mapping_id": "ACME"
}
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0057845616__section16111048102858"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845616__table29926493102858" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845616__row18918097102858"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0057845616__p55970920102858"><strong id="en-us_topic_0057845616__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_0057845616__p37350634102858"><strong id="en-us_topic_0057845616__b38470707163018">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845616__row5502529102858"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845616__p43051733102858">200</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845616__p64638349102858">The request is successful.</p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row44874234102858"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845616__p10934372102858">400</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845616__p13268967102858">The server failed to process the request.</p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row52311841102858"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845616__p9400699102858">401</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845616__p23259137102858">Authentication failed.</p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row8005649102858"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845616__p44477829102858">403</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845616__p45934426102858">Access denied.</p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row10756656102858"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845616__p65982841102858">404</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845616__p43009910102858">The requested resource cannot be found.</p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row51544876102858"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845616__p14385427102858">405</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845616__p24368930102858">The method specified in the request is not allowed for the requested resource.</p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row17993785102858"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845616__p48210456102858">413</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845616__p12732852102858">The request entity is too large.</p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row47486804102858"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845616__p21225877102858">500</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845616__p41574471102858">Internal server error.</p>
</td>
</tr>
<tr id="en-us_topic_0057845616__row38625921102858"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845616__p41691935102858">503</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845616__p21603585102858">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_0057845619.html">Protocol</a></div>
</div>
</div>