• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Common Information
  6. Querying Data in Pages

Querying Data in Pages

Neutron APIs v2.0 allow users to query data in pages by adding the limit and marker parameters to the URL of the list request. The objects are displayed in ascending order of object IDs.

  • next ref in the response indicates the URL of the next page.
  • previous ref in the response indicates the URL of the previous page.

Request Parameter

Parameter

Type

Mandatory

Description

limit

String

No

Specifies the number of items displayed per page.

marker

String

No

Specifies the ID of the last record on the previous page. If the marker value is invalid, error code 400 will be returned.

page_reverse

Bool

No

Sets the paging sequence. The value can be true or false.

Request Example

GET /v2.0/networks?limit=2&marker=3d42a0d4-a980-4613-ae76-a2cddecff054&page_reverse=False

Response Example

{
    "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"
        }
    ]
}