Merge "Fix the incorrect description and sample"
This commit is contained in:
commit
c52cd8dac4
@ -23,7 +23,7 @@ For convenience, collections should contain atom ``next``
|
||||
links. They may optionally also contain ``previous`` links but the current
|
||||
implementation does not contain ``previous`` links. The last
|
||||
page in the list does not contain a link to "next" page. The following examples
|
||||
illustrate three pages in a collection of images. The first page was
|
||||
illustrate three pages in a collection of servers. The first page was
|
||||
retrieved through a **GET** to
|
||||
``http://servers.api.openstack.org/v2.1/servers?limit=1``. In these
|
||||
examples, the *``limit``* parameter sets the page size to a single item.
|
||||
@ -70,35 +70,4 @@ in an array with the name of the entity an underscore (\_) and
|
||||
``links``. The combination of the objects and arrays that start with the
|
||||
name of the collection and an underscore represent the collection in
|
||||
JSON. The approach allows for extensibility of paginated collections by
|
||||
allowing them to be associated with arbitrary properties. It also allows
|
||||
collections to be embedded in other objects as illustrated below. Here,
|
||||
a subset of metadata items are presented within the image. Clients must
|
||||
keep following the ``next`` link to retrieve the full set of metadata.
|
||||
|
||||
|
||||
**Example: Paginated metadata: JSON**
|
||||
|
||||
.. code::
|
||||
|
||||
{
|
||||
"server": {
|
||||
"id": "52415800-8b69-11e0-9b19-734f6f006e54",
|
||||
"name": "Elastic",
|
||||
"metadata": {
|
||||
"Version": "1.3",
|
||||
"ServiceType": "Bronze"
|
||||
},
|
||||
"metadata_links": [
|
||||
{
|
||||
"rel": "next",
|
||||
"href": "https://servers.api.openstack.org/v2.1/servers/fc55acf4-3398-447b-8ef9-72a42086d775/meta?marker=ServiceType"
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
{
|
||||
"rel": "self",
|
||||
"href": "https://servers.api.openstack.org/v2.1/servers/fc55acf4-3398-447b-8ef9-72a42086d775"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
allowing them to be associated with arbitrary properties.
|
||||
|
Loading…
Reference in New Issue
Block a user