forked from docs/doc-exports
Reviewed-by: Kucerak, Kristian <kristian.kucerak@t-systems.com> Co-authored-by: gtema <artem.goncharov@gmail.com> Co-committed-by: gtema <artem.goncharov@gmail.com>
144 lines
9.5 KiB
HTML
144 lines
9.5 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 Message</h4><p id="vpc_version_0003__p4442124613159">Request parameter</p>
|
|
|
|
<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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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>
|
|
<p id="vpc_version_0003__p45883631619">Example request 1</p>
|
|
<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>
|
|
</div>
|
|
<p id="vpc_version_0003__p2841736131714">Example request 2</p>
|
|
<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 class="section" id="vpc_version_0003__section3454265995144"><h4 class="sectiontitle">Response Message</h4><p id="vpc_version_0003__p95431518172">Response parameter</p>
|
|
<p id="vpc_version_0003__p1346571120179">None</p>
|
|
<p id="vpc_version_0003__p3384113171717">Example response 1</p>
|
|
<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>
|
|
</div>
|
|
<p id="vpc_version_0003__p12393115613173">Example response 2</p>
|
|
<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 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>
|
|
|