doc-exports/docs/dc/api-ref/en-us_topic_0055025316.html
Qin Ying, Fan 62ab8a5fe2 DC API 20231101 version
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2024-03-11 15:10:40 +00:00

139 lines
9.4 KiB
HTML

<a name="en-us_topic_0055025316"></a><a name="en-us_topic_0055025316"></a>
<h1 class="topictitle1">Querying the Connection List</h1>
<div id="body36453319"><div class="section" id="en-us_topic_0055025316__section17487184"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0055025316__p51221589">This API is used to query the connection list.</p>
</div>
<div class="section" id="en-us_topic_0055025316__section23166934"><a name="en-us_topic_0055025316__section23166934"></a><a name="section23166934"></a><h4 class="sectiontitle">URI</h4><p id="en-us_topic_0055025316__p77447385357">GET /v2.0/dcaas/direct-connects</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0055025316__table7306830153125" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="en-us_topic_0055025316__row59179138153125"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.2.3.2.5.1.1"><p id="en-us_topic_0055025316__p6185651415404">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.2.3.2.5.1.2"><p id="en-us_topic_0055025316__p4432173215404">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.2.3.2.5.1.3"><p id="en-us_topic_0055025316__p1845161220516">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51%" id="mcps1.3.2.3.2.5.1.4"><p id="en-us_topic_0055025316__p1217810515404">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0055025316__row37905744153125"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.3.2.5.1.1 "><p id="en-us_topic_0055025316__p50466461153125">direct_connects</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.5.1.2 "><p id="en-us_topic_0055025316__p61251530153125">List</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.5.1.3 "><p id="en-us_topic_0055025316__p98450125519">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.2.3.2.5.1.4 "><p id="en-us_topic_0055025316__p23412453153125">Specifies the connection list.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="en-us_topic_0055025316__section64582388"><h4 class="sectiontitle">Request</h4><p id="en-us_topic_0055025316__p969801318374"><a href="#en-us_topic_0055025316__table2198437322244">Table 2</a> lists the request parameter.</p>
<div class="tablenoborder"><a name="en-us_topic_0055025316__table2198437322244"></a><a name="table2198437322244"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0055025316__table2198437322244" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameter</caption><thead align="left"><tr id="en-us_topic_0055025316__row4304807922244"><th align="left" class="cellrowborder" valign="top" width="17.171717171717173%" id="mcps1.3.3.3.2.5.1.1"><p id="en-us_topic_0055025316__p6505580022244"><strong id="en-us_topic_0055025316__b8423527069918">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.151515151515152%" id="mcps1.3.3.3.2.5.1.2"><p id="en-us_topic_0055025316__p329696222244"><strong id="en-us_topic_0055025316__b842352706165439">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.171717171717173%" id="mcps1.3.3.3.2.5.1.3"><p id="en-us_topic_0055025316__p3257067222244"><strong id="en-us_topic_0055025316__b842352706192549">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.505050505050505%" id="mcps1.3.3.3.2.5.1.4"><p id="en-us_topic_0055025316__p5470821922244"><strong id="en-us_topic_0055025316__b84235270616553">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0055025316__row5451891922244"><td class="cellrowborder" valign="top" width="17.171717171717173%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en-us_topic_0055025316__p6157819622316">fields</p>
</td>
<td class="cellrowborder" valign="top" width="15.151515151515152%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en-us_topic_0055025316__p757920222316">String</p>
</td>
<td class="cellrowborder" valign="top" width="17.171717171717173%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en-us_topic_0055025316__p4706384922316">No</p>
</td>
<td class="cellrowborder" valign="top" width="50.505050505050505%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en-us_topic_0055025316__p25148225203247">Specifies the parameters expected to be returned.</p>
<p id="en-us_topic_0055025316__p970883222316">If you do not specify it, all parameters will be returned.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="en-us_topic_0055025316__section44370581"><a name="en-us_topic_0055025316__section44370581"></a><a name="section44370581"></a><h4 class="sectiontitle">Response</h4><p id="en-us_topic_0055025316__p9617341174919"><a href="#en-us_topic_0055025316__table122627546489">Table 3</a> lists the response parameter.</p>
<div class="tablenoborder"><a name="en-us_topic_0055025316__table122627546489"></a><a name="table122627546489"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0055025316__table122627546489" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameter</caption><thead align="left"><tr id="en-us_topic_0055025316__row14268954154817"><th align="left" class="cellrowborder" valign="top" width="24%" id="mcps1.3.4.3.2.4.1.1"><p id="en-us_topic_0055025316__p3271165444819">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26%" id="mcps1.3.4.3.2.4.1.2"><p id="en-us_topic_0055025316__p1927375411483">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="en-us_topic_0055025316__p11275205411482">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0055025316__row15278185419486"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en-us_topic_0055025316__p22793548488">direct_connects</p>
</td>
<td class="cellrowborder" valign="top" width="26%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en-us_topic_0055025316__p6280125454816">List</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en-us_topic_0055025316__p4282454124812">Specifies the connection list.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="en-us_topic_0055025316__p179586111388">For details about the <strong id="en-us_topic_0055025316__b34256566507">direct_connects</strong> field, see <a href="en-us_topic_0055025314.html#en-us_topic_0055025314__en-us_topic_0070676569_table49902238182444">Table 1</a>.</p>
</div>
<div class="section" id="en-us_topic_0055025316__section63790914"><a name="en-us_topic_0055025316__section63790914"></a><a name="section63790914"></a><h4 class="sectiontitle">Examples</h4><ul id="en-us_topic_0055025316__ul16651177103440"><li id="en-us_topic_0055025316__li7613102510419">Example request<ol id="en-us_topic_0055025316__ol14464336114110"><li id="en-us_topic_0055025316__li11464143654111">Querying all connections</li></ol>
<pre class="screen" id="en-us_topic_0055025316__screen1746453616414">GET /v2.0/dcaas/direct-connects</pre>
<ol start="2" id="en-us_topic_0055025316__ol355894918413"><li id="en-us_topic_0055025316__li115586498417">Querying a connection using its ID</li></ol>
<pre class="screen" id="en-us_topic_0055025316__screen45581949104114">GET /v2.0/dcaas/direct-connects?id=6ecd9cf3-ca64-46c7-863f-f2eb1b9e838a</pre>
</li></ul>
</div>
<ul id="en-us_topic_0055025316__ul10754144204210"><li id="en-us_topic_0055025316__li14754114114217"><a name="en-us_topic_0055025316__li14754114114217"></a><a name="li14754114114217"></a>Example response<pre class="screen" id="en-us_topic_0055025316__screen33824800112742">{
"direct_connects" : [{
"name": "direct connect",
"id": "294ebeeb-62dd-4ece-99f5-73055df6d835",
"description": "",
"tenant_id": "0605768ad980d5762f8ac010b919754c",
"type": "hosted",
"hosting_id": "0e85c677-6eb5-4ef6-87a7-74d4586be895",
"vlan": 228,
"charge_mode": null,
"port_type": "1G",
"bandwidth": 2,
"location": "Biere",
"peer_location": "",
"device_id": "18.8.215.131",
"interface_name": "Eth-Trunk2",
"redundant_id": null,
"provider": "OTC",
"provider_status": "ACTIVE",
"status": "ACTIVE",
"apply_time": "2022-12-08T01:59:36.000Z",
"reason": null,
"admin_state_up": true,
"order_id": null,
"product_id": null,
"spec_code": null,
"applicant": null,
"mobile": null,
"email": null,
"create_time": "2022-12-08T01:59:36.000Z",
"region_id": null,
"service_key": null,
"cable_label": null,
"peer_port_type": null,
"peer_provider": null,
"onestop_product_id": null,
"building_line_product_id": null,
"last_onestop_product_id": null,
"period_type": null,
"period_num": null,
"vgw_type": "default",
"lag_id": null
}]
}</pre>
</li></ul>
<div class="section" id="en-us_topic_0055025316__section6416329132915"><h4 class="sectiontitle">Status Codes</h4><p id="en-us_topic_0055025316__p1586444715222">For details, see <a href="en-us_topic_0055025342.html">Common Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0055025313.html">Connection</a></div>
</div>
</div>