forked from docs/doc-exports
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>
189 lines
15 KiB
HTML
189 lines
15 KiB
HTML
<a name="vpc_version_0003"></a><a name="vpc_version_0003"></a>
|
|
|
|
<h1 class="topictitle1">Pagination</h1>
|
|
<div id="body1503021076365"><div class="section" id="vpc_version_0003__section3385602995157"><h4 class="sectiontitle">Function</h4><p id="vpc_version_0003__p4087952295144">Neutron APIs v2.0 provides the pagination function. You can set parameters <strong id="vpc_version_0003__b842352706112612">limit</strong> and <strong id="vpc_version_0003__b842352706112619">marker</strong> in the URL to enable the desired number of items to be returned. All returned items are displayed in the ascending order of ID.</p>
|
|
<ul id="vpc_version_0003__ul148624214151"><li id="vpc_version_0003__li53581836154916">To access the next page of the request, perform the following configurations:<ul id="vpc_version_0003__ul125183820492"><li id="vpc_version_0003__li12716941164919">Replace the value of <strong id="vpc_version_0003__b84235270615014_1">marker</strong> in the original access request URL. Replace the value of <strong id="vpc_version_0003__b44072057815121_1">marker</strong> to the value of <strong id="vpc_version_0003__b99664786151946_1">marker</strong> in the value of <strong id="vpc_version_0003__b842352706152030_1">herf</strong> if the value of <strong id="vpc_version_0003__b84235270615136_1">rel</strong> in the response is <strong id="vpc_version_0003__b842352706151835_1">next</strong>.</li><li id="vpc_version_0003__li1086252191510">Set the value of <strong id="vpc_version_0003__b842352706152058_1">page_reverse</strong> to <strong id="vpc_version_0003__b84235270615212_1">False</strong>.</li></ul>
|
|
</li><li id="vpc_version_0003__li866024615495">To access the previous page of the request, perform the following configurations:<ul id="vpc_version_0003__ul14756948134917"><li id="vpc_version_0003__li999274545015">Replace the value of <strong id="vpc_version_0003__b84235270615014_3">marker</strong> in the original access request URL. Replace the value of <strong id="vpc_version_0003__b44072057815121_3">marker</strong> to the value of <strong id="vpc_version_0003__b99664786151946_3">marker</strong> in the value of <strong id="vpc_version_0003__b842352706152030_3">herf</strong> if the value of <strong id="vpc_version_0003__b84235270615136_3">rel</strong> in the response is <strong id="vpc_version_0003__b842352706151835_3">previous</strong>.</li><li id="vpc_version_0003__li3430201161918">Set the value of <strong id="vpc_version_0003__b842352706152058_3">page_reverse</strong> to <strong id="vpc_version_0003__b84235270615212_3">True</strong>.</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="vpc_version_0003__section483652795144"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_version_0003__table5621437795144" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameter</caption><thead align="left"><tr id="vpc_version_0003__row2739272895144"><th align="left" class="cellrowborder" valign="top" width="16.97%" id="mcps1.3.2.2.2.5.1.1"><p id="vpc_version_0003__p421851895144">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.78%" id="mcps1.3.2.2.2.5.1.2"><p id="vpc_version_0003__p615565295144">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.81%" id="mcps1.3.2.2.2.5.1.3"><p id="vpc_version_0003__p2884577095144">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50.44%" id="mcps1.3.2.2.2.5.1.4"><p id="vpc_version_0003__p5480603395144">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_version_0003__row1010368095144"><td class="cellrowborder" valign="top" width="16.97%" headers="mcps1.3.2.2.2.5.1.1 "><p id="vpc_version_0003__p1309177695144">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.78%" headers="mcps1.3.2.2.2.5.1.2 "><p id="vpc_version_0003__p5380095395144">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.81%" headers="mcps1.3.2.2.2.5.1.3 "><p id="vpc_version_0003__p6290990695144">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.44%" headers="mcps1.3.2.2.2.5.1.4 "><p id="vpc_version_0003__p6253758795144">Specifies the number of items displayed per page.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_version_0003__row2596737495144"><td class="cellrowborder" valign="top" width="16.97%" headers="mcps1.3.2.2.2.5.1.1 "><p id="vpc_version_0003__p2298257595144">marker</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.78%" headers="mcps1.3.2.2.2.5.1.2 "><p id="vpc_version_0003__p4964932595144">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.81%" headers="mcps1.3.2.2.2.5.1.3 "><p id="vpc_version_0003__p6217239995144">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.44%" headers="mcps1.3.2.2.2.5.1.4 "><p id="vpc_version_0003__p279958295144">Specifies the ID of the last item in the previous list. If the marker value is invalid, error code 400 will be returned.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_version_0003__row2519624195144"><td class="cellrowborder" valign="top" width="16.97%" headers="mcps1.3.2.2.2.5.1.1 "><p id="vpc_version_0003__p2762967895144">page_reverse</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.78%" headers="mcps1.3.2.2.2.5.1.2 "><p id="vpc_version_0003__p2341143595144">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.81%" headers="mcps1.3.2.2.2.5.1.3 "><p id="vpc_version_0003__p1727806495144">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.44%" headers="mcps1.3.2.2.2.5.1.4 "><p id="vpc_version_0003__p5734595895144">Specifies the page direction. The value can be <strong id="vpc_version_0003__b842352706114342">True</strong> or <strong id="vpc_version_0003__b842352706114350">False</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_version_0003__section14203112718563"><h4 class="sectiontitle">Example Request</h4><ul id="vpc_version_0003__ul10865173214575"><li id="vpc_version_0003__li148658321578">When <strong id="vpc_version_0003__b5895834193720">page_reverse</strong> is set to <strong id="vpc_version_0003__b1815124016372">False</strong>:</li></ul>
|
|
<pre class="screen" id="vpc_version_0003__screen6349039695144">GET https://{Endpoint}/v2.0/networks?limit=2&marker=3d42a0d4-a980-4613-ae76-a2cddecff054&page_reverse=False</pre>
|
|
<ul id="vpc_version_0003__ul042544417577"><li id="vpc_version_0003__li1142584485720">When <strong id="vpc_version_0003__b11639122144315">page_reverse</strong> is set to <strong id="vpc_version_0003__b714413274430">True</strong>:</li></ul>
|
|
<pre class="screen" id="vpc_version_0003__screen31511838265">GET https://{Endpoint}/v2.0/vpc/peerings?limit=2&marker=e5a0c88e-228e-4e62-a8b0-90825b1b7958&page_reverse=True</pre>
|
|
</div>
|
|
<div class="section" id="vpc_version_0003__section3454265995144"><h4 class="sectiontitle">Response Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_version_0003__en-us_topic_0062207386_table48620262" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter</caption><thead align="left"><tr id="vpc_version_0003__en-us_topic_0062207386_row18332862"><th align="left" class="cellrowborder" valign="top" width="22.32%" id="mcps1.3.4.2.2.4.1.1"><p id="vpc_version_0003__en-us_topic_0062207386_p8566882">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.67%" id="mcps1.3.4.2.2.4.1.2"><p id="vpc_version_0003__en-us_topic_0062207386_p22828842">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.010000000000005%" id="mcps1.3.4.2.2.4.1.3"><p id="vpc_version_0003__en-us_topic_0062207386_p60161096">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_version_0003__row10838426109"><td class="cellrowborder" valign="top" width="22.32%" headers="mcps1.3.4.2.2.4.1.1 "><p id="vpc_version_0003__p97911291701">{resources}_links</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.67%" headers="mcps1.3.4.2.2.4.1.2 "><p id="vpc_version_0003__p779329805">Array of <a href="#vpc_version_0003__table109221759807">{resources}_link</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.010000000000005%" headers="mcps1.3.4.2.2.4.1.3 "><p id="vpc_version_0003__p97972919015">Specifies the pagination information. For details, see <a href="#vpc_version_0003__table109221759807">Table 3</a>. <strong id="vpc_version_0003__b12114359192011">{<em id="vpc_version_0003__i584428216">resources</em>}</strong> indicates the resource name, for example, <strong id="vpc_version_0003__b17200165422314">ports</strong>, <strong id="vpc_version_0003__b1393645618239">networks</strong>, <strong id="vpc_version_0003__b35461010242">subnets</strong>, <strong id="vpc_version_0003__b382273142415">routers</strong>, <strong id="vpc_version_0003__b1391116652419">firewall_rules</strong>, <strong id="vpc_version_0003__b42611101242">firewall_policies</strong>, <strong id="vpc_version_0003__b3700316112410">firewall_groups</strong>, <strong id="vpc_version_0003__b1476416190241">security_groups</strong>, <strong id="vpc_version_0003__b12900102282416">subnetpools</strong>, <strong id="vpc_version_0003__b1259426112420">floatingips</strong>, and <strong id="vpc_version_0003__b4811153042418">security_group_rules</strong>.</p>
|
|
<p id="vpc_version_0003__p334511413543">Only when <strong id="vpc_version_0003__b272421717496">limit</strong> is used for filtering and the number of resources exceeds the value of <strong id="vpc_version_0003__b372561774913">limit</strong> or 2000 (default value of <strong id="vpc_version_0003__b12725617154912">limit</strong>), value <strong id="vpc_version_0003__b10725181717498">next</strong> will be returned for <strong id="vpc_version_0003__b1272601714915">rel</strong> and a link for <strong id="vpc_version_0003__b97261117134915">href</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_version_0003__table109221759807"></a><a name="table109221759807"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_version_0003__table109221759807" frame="border" border="1" rules="all"><caption><b>Table 3 </b>{resources}_link object</caption><thead align="left"><tr id="vpc_version_0003__row17420713"><th align="left" class="cellrowborder" valign="top" width="14.14%" id="mcps1.3.4.3.2.4.1.1"><p id="vpc_version_0003__p1941101019">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.14%" id="mcps1.3.4.3.2.4.1.2"><p id="vpc_version_0003__p641904118">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="71.72%" id="mcps1.3.4.3.2.4.1.3"><p id="vpc_version_0003__p194180011">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_version_0003__row84506114"><td class="cellrowborder" valign="top" width="14.14%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_version_0003__p154170311">href</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.14%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_version_0003__p240019116">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.72%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_version_0003__p1842011117">Specifies the API link.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_version_0003__row1740010112"><td class="cellrowborder" valign="top" width="14.14%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_version_0003__p341401111">rel</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.14%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_version_0003__p641901218">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.72%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_version_0003__p1942002019">The API link is used to query the next or previous page. <strong id="vpc_version_0003__b368413593552">next</strong>: The next page is queried. <strong id="vpc_version_0003__b19571144175615">previous</strong>: The previous page is queried.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_version_0003__section14637733105818"><h4 class="sectiontitle">Example Response</h4><ul id="vpc_version_0003__ul418483619587"><li id="vpc_version_0003__li1118483615810">When <strong id="vpc_version_0003__b143833734311">page_reverse</strong> is set to <strong id="vpc_version_0003__b1739537174315">False</strong>:</li></ul>
|
|
<pre class="screen" id="vpc_version_0003__screen4649202795144">{
|
|
"networks": [
|
|
{
|
|
"status": "ACTIVE",
|
|
"subnets": [],
|
|
"name": "liudongtest ",
|
|
"admin_state_up": false,
|
|
"tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
|
|
"id": "60c809cb-6731-45d0-ace8-3bf5626421a9"
|
|
},
|
|
{
|
|
"status": "ACTIVE",
|
|
"subnets": [
|
|
"132dc12d-c02a-4c90-9cd5-c31669aace04"
|
|
],
|
|
"name": "publicnet",
|
|
"admin_state_up": true,
|
|
"tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
|
|
"id": "9daeac7c-a98f-430f-8e38-67f9c044e299"
|
|
}
|
|
],
|
|
"networks_links": [
|
|
{
|
|
"href": "http://192.168.82.231:9696/v2.0/networks?limit=2&marker=9daeac7c-a98f-430f-8e38-67f9c044e299",
|
|
"rel": "next"
|
|
},
|
|
{
|
|
"href": "http://192.168.82.231:9696/v2.0/networks?limit=2&marker=60c809cb-6731-45d0-ace8-3bf5626421a9&page_reverse=True",
|
|
"rel": "previous"
|
|
}
|
|
]
|
|
}</pre>
|
|
<ul id="vpc_version_0003__ul81700472582"><li id="vpc_version_0003__li917014476584">When <strong id="vpc_version_0003__b56277514445">page_reverse</strong> is set to <strong id="vpc_version_0003__b1462814544413">True</strong>:</li></ul>
|
|
<pre class="screen" id="vpc_version_0003__screen91528382069">{
|
|
"peerings_links": [
|
|
{
|
|
"marker": "dd442819-5638-401c-bd48-a82703cf0464",
|
|
"rel": "next"
|
|
},
|
|
{
|
|
"marker": "1e13cbaf-3ce4-413d-941f-66d855dbfa7f",
|
|
"rel": "previous"
|
|
}
|
|
],
|
|
"peerings": [
|
|
{
|
|
"status": "ACTIVE",
|
|
"accept_vpc_info": {
|
|
"vpc_id": "83a48834-b9bc-4f70-aa46-074568594650",
|
|
"tenant_id": "e41a43bf06e249678413c6d61536eff9"
|
|
},
|
|
"request_vpc_info": {
|
|
"vpc_id": "db8e7687-e43b-4fc1-94cf-16f69f484d6d",
|
|
"tenant_id": "e41a43bf06e249678413c6d61536eff9"
|
|
},
|
|
"name": "peering1",
|
|
"id": "1e13cbaf-3ce4-413d-941f-66d855dbfa7f"
|
|
},
|
|
{
|
|
"status": "ACTIVE",
|
|
"accept_vpc_info": {
|
|
"vpc_id": "83a48834-b9bc-4f70-aa46-074568594650",
|
|
"tenant_id": "e41a43bf06e249678413c6d61536eff9"
|
|
},
|
|
"request_vpc_info": {
|
|
"vpc_id": "bd63cc9e-e7b8-4d4e-a0e9-055031470ffc",
|
|
"tenant_id": "e41a43bf06e249678413c6d61536eff9"
|
|
},
|
|
"name": "peering2",
|
|
"id": "dd442819-5638-401c-bd48-a82703cf0464"
|
|
}
|
|
]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="vpc_version_0003__section31981619"><h4 class="sectiontitle">Status Code</h4><p id="vpc_version_0003__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="vpc_version_0003__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_version_0003__p7233105282813">See <a href="vpc_api_0003.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpc_version_0000.html">API Version Information</a></div>
|
|
</div>
|
|
</div>
|
|
|