Files
database-api/apidocs/target/docbkx/webhelp/cdb-devguide-reviewer/content/pagination.html
Nikhil Manchanda e434448adb Gerrit Review for Database Developer Guide
The Database Developer Guide PDF is located in the repo at:
apidocs/target/docbkx/webhelp/cdb-devguide-reviewer/cdb-devguide-reviewer.pdf

Updated api-doc with Security Groups related API information.

Added Security Groups and Security Group Rules as entities and related API calls to the Reddwarf API Docs.

Change-Id: I4d559b25413a6138cd7d2fb94c028f8cafde100c
2013-05-02 13:24:14 -05:00

252 lines
25 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:exsl="http://exslt.org/common" xmlns:ng="http://docbook.org/docbook-ng" xmlns:fb="http://ogp.me/ns/fb#"><head>
<link type="text/css" rel="stylesheet" href="styles/shCoreDefault.css"/><script type="text/javascript" src="scripts/shCore.js"><!----></script><script type="text/javascript">
SyntaxHighlighter.config.space = ' ';
SyntaxHighlighter.all();
</script>
<title>3.4. Pagination - OpenStack Cloud Databases Developer Guide
 - API v1.0</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><meta name="mavenGroupId" content="com.rackspace.cloud.dbaas"/><meta name="mavenArtifactId" content="dbaas-docs"/><meta name="mavenVersionId" content="1.0.0-SNAPSHOT"/><link rel="home" href="index.html" title="OpenStack Cloud Databases Developer Guide"/><link rel="up" href="General_API_Information-d1e633.html" title="Chapter 3. General API Information"/><link rel="prev" href="datetimeformat.html" title="3.3. Date/Time Format"/><link rel="next" href="DB_faults.html" title="3.5. Faults"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script type="text/javascript">
//The id for tree cookie
var treeCookieId = "treeview-5361";
var language = "en";
var w = new Object();
//Localization
txt_filesfound = 'Results';
txt_enter_at_least_1_char = "You must enter at least one character.";
txt_browser_not_supported = "Your browser is not supported. Use of Mozilla Firefox is recommended.";
txt_please_wait = "Please wait. Search in progress...";
txt_results_for = "Results for: ";
</script><style type="text/css">
input {
margin-bottom: 5px;
margin-top: 2px;
}
.folder {
display: block;
height: 22px;
padding-left: 20px;
background: transparent url(../common/jquery/treeview/images/folder.gif) 0 0px no-repeat;
}
</style><link rel="shortcut icon" href="../favicon.ico" type="image/x-icon"/><link rel="stylesheet" type="text/css" href="../common/css/positioning.css"/><link rel="stylesheet" type="text/css" href="../common/css/custom.css"/><link href="../atom.xml" type="application/atom+xml" rel="alternate" title="Document ATOM Feed"/><link rel="canonical" href="http://docs.rackspace.com/cdb/api/v1.0/cdb-devguide/content/pagination.html"/><!--[if IE]>
<link rel="stylesheet" type="text/css" href="../common/css/ie.css"/>
<![endif]--><link rel="stylesheet" type="text/css" href="../common/jquery/theme-redmond/jquery-ui-1.8.2.custom.css"/><link rel="stylesheet" type="text/css" href="../common/jquery/treeview/jquery.treeview.css"/><script type="text/javascript" src="../common/jquery/jquery-1.4.3.min.js"><!----></script><script type="text/javascript" src="../common/jquery/jquery-ui-1.8.2.custom.min.js"><!----></script><script type="text/javascript" src="../common/jquery/jquery.cookie.js"><!----></script><script type="text/javascript" src="../common/jquery/treeview/jquery.treeview.min.js"><!----></script><script type="text/javascript" src="../common/jquery/jquery.qtip-1.0.0-rc3/jquery.qtip-1.0.0-rc3.min.js"><!--jQuery plugin for glossary popups. --></script><script type="text/javascript" src="search/htmlFileList.js"><!----></script><script type="text/javascript" src="search/htmlFileInfoList.js"><!----></script><script type="text/javascript" src="search/nwSearchFnt.js"><!----></script><script type="text/javascript" src="search/stemmers/en_stemmer.js"><!--//make this scalable to other languages as well.--></script><script type="text/javascript" src="search/index-1.js"><!----></script><script type="text/javascript" src="search/index-2.js"><!----></script><script type="text/javascript" src="search/index-3.js"><!----></script></head><body><div id="header"><a onclick="_gaq.push(['_trackEvent', 'Header', 'logo', 'click', 1]);" target="_blank" href="http://www.openstack.org"><img src="../common/images/openstack-logo.png" alt="OpenStack Documentation" width="157" height="47"/></a><h1>3.4. Pagination</h1><div id="navheader" align="right"><!----><table class="navLinks"><tr><td><a id="showHideButton" onclick="showHideToc(); _gaq.push(['_trackEvent', 'Header', 'show/hide', 'click', 1]);" class="pointLeft" title="Hide TOC tree">Sidebar
</a></td><td><a accesskey="p" class="navLinkPrevious" onclick="_gaq.push(['_trackEvent', 'Header', 'prevLink', 'click', 1]);" tabindex="5" href="datetimeformat.html">Prev</a>
|
<a accesskey="u" class="navLinkUp" onclick="_gaq.push(['_trackEvent', 'Header', 'upLink', 'click', 1]);" tabindex="5" href="General_API_Information-d1e633.html">Up</a>
|
<a accesskey="n" class="navLinkNext" onclick="_gaq.push(['_trackEvent', 'Header', 'nextLink', 'click', 1]);" tabindex="5" href="DB_faults.html">Next</a></td></tr></table></div></div><div id="toolbar" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"><div id="toolbar-left"><p class="breadcrumbs"><a href="http://docs.openstack.org/">OpenStack Manuals</a><a href="index.html">OpenStack Cloud Databases Developer Guide
 - API v1.0</a></p><a onclick="_gaq.push(['_trackEvent', 'Header', 'pdfDownload', 'click', 1]);" alt="Download a pdf of this document" class="pdficon" href="../cdb-devguide-reviewer.pdf"><img src="../common/images/pdf.png"/></a>
 
<a href="../atom.xml"><img alt="Atom feed of this document" src="../common/images/feed-icon.png"/></a></div></div><div id="content"><div class="statustext">REVIEW -  REVIEW -  REVIEW -  REVIEW -  REVIEW -  REVIEW -  REVIEW -  REVIEW - </div><div class="section"><div xmlns="" class="titlepage"><div><div><h2 xmlns="http://www.w3.org/1999/xhtml" class="title" style="clear: both"><a id="pagination"> </a>3.4. Pagination</h2></div></div></div><p>To reduce load on the service, list operations
return a maximum of 20 items at a time. This is
referred to as <span class="emphasis"><em>pagination</em></span>. Cloud
Databases has separate paging limits for instances,
databases, and users, which are currently all set to
20. If a request supplies no limit or one that exceeds
the configured default limit, the default is used
instead.</p><p> Pagination provides the ability to limit the size
of the returned data as well as retrieve a specified
subset of a large data set. Pagination has two key
concepts: limit and marker. <span class="emphasis"><em>Limit</em></span>
is the restriction on the maximum number of items for
that type that can be returned.
<span class="emphasis"><em>Marker</em></span> is the ID of the last
item in the previous list returned. The ID is the UUID
in the case of instances, and the name in the case of
databases and users. For example, a query could
request the next 10 instances after the instance
"1234" as follows:
<code class="code">?limit=10&amp;marker=1234</code>. Items are
displayed sorted by ID. </p><p>Pagination applies only to the calls listed in the
following table: </p><table rules="all" id="d6e186"><thead><tr align="center">
<td>Verb</td>
<td colspan="2">URI</td>
<td colspan="3">Description</td>
</tr></thead><tbody><tr>
<td><span class="command"><strong>GET</strong></span></td>
<td colspan="2">/instances/</td>
<td colspan="3">Lists the status and
information for all database
instances.</td>
</tr><tr>
<td><span class="command"><strong>GET</strong></span></td>
<td colspan="2">
/instances/{instanceId}/databases </td>
<td colspan="3">Lists databases for the
specified instance.</td>
</tr><tr>
<td><span class="command"><strong>GET</strong></span></td>
<td colspan="2"> /instances/{instanceId}/users </td>
<td colspan="3">Lists the users in the
specified database instance.</td>
</tr></tbody></table><p>If the content returned by a call is paginated, the
response includes a structured link much like an
instance item's links, with the basic structure
<code class="code">{"href": "&lt;url&gt;", "rel": "next"}</code>.
Any response that is truncated by pagination will have
a <span class="emphasis"><em>next</em></span> link, which points to the
next item in the collection. If there are no more
items, no <span class="emphasis"><em>next</em></span> link is
returned.</p><p>See the examples of paged List Instances calls that
follow.</p><p class="remark"><em><span class="remark"><span class="remark">Reviewer: Need new examples that show OpenStack
host.</span></span></em></p><div class="example"><a id="d6e214"> </a><p class="title"><strong>Example 3.3. List Instances Paged Request: XML</strong></p><div class="example-contents"><pre class="programlisting brush: xml; ">
GET /v1.0/1234/instances?limit=2 HTTP/1.1
User-Agent: python-reddwarfclient
Host: openstack.example.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/xml
Content-Type: application/xml
</pre></div></div><br class="example-break"/><div class="example"><a id="d6e217"> </a><p class="title"><strong>Example 3.4. List Instances Paged Request: JSON</strong></p><div class="example-contents"><pre class="programlisting brush: json; ">
GET /v1.0/1234/instances?limit=2 HTTP/1.1
User-Agent: python-reddwarfclient
Host: openstack.example.com
X-Auth-Token: 87c6033c-9ff6-405f-943e-2deb73f278b7
Accept: application/json
Content-Type: application/json
</pre></div></div><br class="example-break"/><p>Notice that the paged request examples above set the
limit to 2 (<code class="code">?limit=2</code>), so the responses
that follow each show 2 instances and return a
<span class="emphasis"><em>marker</em></span> set to the UUID of the
last item in the returned list
(<code class="code">?marker=4137d6a4-03b7-4b66-b0ef-8c7c35c470d3</code>).
Also a link is provided to retrieve the next 2 results
(<code class="code">limit=2</code>) in the link element
identified by the attribute <code class="code">rel="next"</code>
(XML) or <code class="code">"rel":"next"</code> (JSON):</p><div class="example"><a id="d6e227"> </a><p class="title"><strong>Example 3.5. List Instances Paged Response: XML</strong></p><div class="example-contents"><pre class="programlisting brush: xml; ">
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 1538
Date: Mon, 18 Mar 2013 19:09:17 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
&lt;instances xmlns="http://docs.openstack.org/database/api/v1.0"&gt;
&lt;instance id="098653ba-218b-47ce-936a-e0b749101f81" name="xml_rack_instance" status="ACTIVE"&gt;
&lt;links&gt;
&lt;link href="https://openstack.example.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="self"/&gt;
&lt;link href="https://openstack.example.com/instances/098653ba-218b-47ce-936a-e0b749101f81" rel="bookmark"/&gt;
&lt;/links&gt;
&lt;volume size="2"/&gt;
&lt;flavor id="1"&gt;
&lt;links&gt;
&lt;link href="https://openstack.example.com/v1.0/1234/flavors/1" rel="self"/&gt;
&lt;link href="https://openstack.example.com/flavors/1" rel="bookmark"/&gt;
&lt;/links&gt;
&lt;/flavor&gt;
&lt;/instance&gt;
&lt;instance id="44b277eb-39be-4921-be31-3d61b43651d7" name="json_rack_instance" status="ACTIVE"&gt;
&lt;links&gt;
&lt;link href="https://openstack.example.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7" rel="self"/&gt;
&lt;link href="https://openstack.example.com/instances/44b277eb-39be-4921-be31-3d61b43651d7" rel="bookmark"/&gt;
&lt;/links&gt;
&lt;volume size="2"/&gt;
&lt;flavor id="1"&gt;
&lt;links&gt;
&lt;link href="https://openstack.example.com/v1.0/1234/flavors/1" rel="self"/&gt;
&lt;link href="https://openstack.example.com/flavors/1" rel="bookmark"/&gt;
&lt;/links&gt;
&lt;/flavor&gt;
&lt;/instance&gt;
&lt;links&gt;
&lt;link href="https://openstack.example.com/v1.0/1234/instances?marker=44b277eb-39be-4921-be31-3d61b43651d7&amp;amp;limit=2" rel="next"/&gt;
&lt;/links&gt;
&lt;/instances&gt;
</pre></div></div><br class="example-break"/><div class="example"><a id="d6e230"> </a><p class="title"><strong>Example 3.6. List Instances Paged Response: JSON</strong></p><div class="example-contents"><pre class="programlisting brush: json; ">
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1172
Date: Mon, 18 Mar 2013 19:09:17 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
{
"instances": [
{
"flavor": {
"id": "1",
"links": [
{
"href": "https://openstack.example.com/v1.0/1234/flavors/1",
"rel": "self"
},
{
"href": "https://openstack.example.com/flavors/1",
"rel": "bookmark"
}
]
},
"id": "098653ba-218b-47ce-936a-e0b749101f81",
"links": [
{
"href": "https://openstack.example.com/v1.0/1234/instances/098653ba-218b-47ce-936a-e0b749101f81",
"rel": "self"
},
{
"href": "https://openstack.example.com/instances/098653ba-218b-47ce-936a-e0b749101f81",
"rel": "bookmark"
}
],
"name": "xml_rack_instance",
"status": "ACTIVE",
"volume": {
"size": 2
}
},
{
"flavor": {
"id": "1",
"links": [
{
"href": "https://openstack.example.com/v1.0/1234/flavors/1",
"rel": "self"
},
{
"href": "https://openstack.example.com/flavors/1",
"rel": "bookmark"
}
]
},
"id": "44b277eb-39be-4921-be31-3d61b43651d7",
"links": [
{
"href": "https://openstack.example.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7",
"rel": "self"
},
{
"href": "https://openstack.example.com/instances/44b277eb-39be-4921-be31-3d61b43651d7",
"rel": "bookmark"
}
],
"name": "json_rack_instance",
"status": "ACTIVE",
"volume": {
"size": 2
}
}
],
"links": [
{
"href": "https://openstack.example.com/v1.0/1234/instances?marker=44b277eb-39be-4921-be31-3d61b43651d7&amp;limit=2",
"rel": "next"
}
]
}
</pre></div></div><br class="example-break"/></div><script type="text/javascript" src="../common/main.js"><!----></script><hr/><div id="disqus_thread"><script type="text/javascript">
var disqus_shortname = 'openstackdocs';
var disqus_identifier = 'cdb-devguidepagination';
</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><script type="text/javascript" src="../common/comments.js"><!----></script></div><hr/><div class="legal"><a href="index.html">Legal notices</a></div></div><div><div id="leftnavigation" style="padding-top:3px; background-color:white;"><div id="tabs"><ul><li><a href="#treeDiv" tabindex="1"><span class="contentsTab">Contents</span></a></li><li><a href="#searchDiv" tabindex="1"><span class="searchTab">Search</span></a></li></ul><div id="treeDiv"><img src="../common/images/loading.gif" alt="loading table of contents..." id="tocLoading" style="display:block;"/><div id="ulTreeDiv" style="display:none" class="thisisthat"><ul id="tree" class="filetree"><li tabindex="2"><span class="file"><a href="overview.html">1. Overview</a></span><ul><li tabindex="2"><span class="file"><a href="Intended_Audience-d1e122.html">1.1. Intended Audience</a></span></li><li tabindex="2"><span class="file"><a href="Document_Change_History-d1e166.html">1.2. Document Change History</a></span></li><li tabindex="2"><span class="file"><a href="Additional_Resources-d1e532.html">1.3. Additional Resources</a></span></li></ul></li><li tabindex="2"><span class="file"><a href="Concepts-d1e563.html">2. Concepts</a></span><ul><li tabindex="2"><span class="file"><a href="Concepts-d1e563.html#DatabaseInstance-d1e588">2.1. Database Instance</a></span></li><li tabindex="2"><span class="file"><a href="Concepts-d1e563.html#Database">2.2. Database</a></span></li><li tabindex="2"><span class="file"><a href="Concepts-d1e563.html#Flavor">2.3. Flavor</a></span></li><li tabindex="2"><span class="file"><a href="Concepts-d1e563.html#Volume">2.4. Volume</a></span></li></ul></li><li tabindex="2"><span class="file"><a href="General_API_Information-d1e633.html">3. General API Information</a></span><ul><li tabindex="2"><span class="file"><a href="Authentication-d1e647.html">3.1. Authentication</a></span></li><li tabindex="2"><span class="file"><a href="DB_service_versions.html">3.2. Cloud Databases Service Versions</a></span><ul><li tabindex="2"><span class="file"><a href="Contract_Version-d1e825.html">3.2.1. Contract Version</a></span></li><li tabindex="2"><span class="file"><a href="API_Version_Headers-d1e855.html">3.2.2. API Version</a></span></li></ul></li><li tabindex="2"><span class="file"><a href="datetimeformat.html">3.3. Date/Time Format</a></span></li><li tabindex="2" id="webhelp-currentid"><span class="file"><a href="pagination.html">3.4. Pagination</a></span></li><li tabindex="2"><span class="file"><a href="DB_faults.html">3.5. Faults</a></span><ul><li tabindex="2"><span class="file"><a href="synchro_vs_async_faults.html">3.5.1. Synchronous Versus Asynchronous
Faults</a></span></li></ul></li><li tabindex="2"><span class="file"><a href="database_instance_status.html">3.6. Database Instance Status</a></span></li></ul></li><li tabindex="2"><span class="file"><a href="API_Operations-d1e2264.html">4. API Operations</a></span><ul><li tabindex="2"><span class="file"><a href="API_Versions.html">4.1. API Versions</a></span><ul><li tabindex="2"><span class="file"><a href="GET_getVersions__.html">4.1.1. List Versions</a></span></li><li tabindex="2"><span class="file"><a href="GET_getVersionInfo__version__.html">4.1.2. List Version Details</a></span></li></ul></li><li tabindex="2"><span class="file"><a href="Database_Instances.html">4.2. Database Instances</a></span><ul><li tabindex="2"><span class="file"><a href="POST_createInstance__version___accountId__instances_.html">4.2.1. Create Database Instance</a></span></li><li tabindex="2"><span class="file"><a href="GET_getInstance__version___accountId__instances_.html">4.2.2. List All Database Instances</a></span></li><li tabindex="2"><span class="file"><a href="GET_getInstanceById__version___accountId__instances__instanceId__.html">4.2.3. List Database Instance Status and Details</a></span></li><li tabindex="2"><span class="file"><a href="DELETE_deleteInstance__version___accountId__instances__instanceId__.html">4.2.4. Delete Database Instance</a></span></li><li tabindex="2"><span class="file"><a href="POST_createRoot__version___accountId__instances__instanceId__root_.html">4.2.5. Enable Root User</a></span></li><li tabindex="2"><span class="file"><a href="GET_isRootEnabled__version___accountId__instances__instanceId__root_.html">4.2.6. List Root-Enabled Status</a></span></li></ul></li><li tabindex="2"><span class="file"><a href="Database_Instances_Actions.html">4.3. Database Instance Actions</a></span><ul><li tabindex="2"><span class="file"><a href="POST_restartInstance__version___accountId__instances__instanceId__action_.html">4.3.1. Restart Instance</a></span></li><li tabindex="2"><span class="file"><a href="POST_resizeInstance__version___accountId__instances__instanceId__action_.html">4.3.2. Resize the Instance</a></span></li><li tabindex="2"><span class="file"><a href="POST_resizeVolume__version___accountId__instances__instanceId__action_.html">4.3.3. Resize the Instance Volume</a></span></li></ul></li><li tabindex="2"><span class="file"><a href="databases.html">4.4. Databases</a></span><ul><li tabindex="2"><span class="file"><a href="POST_createDatabase__version___accountId__instances__instanceId__databases_.html">4.4.1. Create Database</a></span></li><li tabindex="2"><span class="file"><a href="GET_getDatabases__version___accountId__instances__instanceId__databases_.html">4.4.2. List Databases for Instance</a></span></li><li tabindex="2"><span class="file"><a href="DELETE_deleteDatabase__version___accountId__instances__instanceId__databases__databaseName__.html">4.4.3. Delete Database</a></span></li></ul></li><li tabindex="2"><span class="file"><a href="user_management.html">4.5. Users</a></span><ul><li tabindex="2"><span class="file"><a href="POST_createUser__version___accountId__instances__instanceId__users_.html">4.5.1. Create User</a></span></li><li tabindex="2"><span class="file"><a href="GET_getUsers__version___accountId__instances__instanceId__users_.html">4.5.2. List Users in Database Instance</a></span></li><li tabindex="2"><span class="file"><a href="PUT_changePass__version___accountId__instances__instanceId__users_.html">4.5.3. Change User(s) Password</a></span></li><li tabindex="2"><span class="file"><a href="GET_listUser__version___accountId__instances__instanceId__users__name__.html">4.5.4. List User</a></span></li><li tabindex="2"><span class="file"><a href="DELETE_deleteUser__version___accountId__instances__instanceId__users__name__.html">4.5.5. Delete User</a></span></li><li tabindex="2"><span class="file"><a href="GET_getUserAccess__version___accountId__instances__instanceId__users__name__databases_.html">4.5.6. List User Access</a></span></li><li tabindex="2"><span class="file"><a href="PUT_grantUserAccess__version___accountId__instances__instanceId__users__name__databases_.html">4.5.7. Grant User Access</a></span></li><li tabindex="2"><span class="file"><a href="DELETE_revokeUserAccess__version___accountId__instances__instanceId__users__name__databases__databaseName__.html">4.5.8. Revoke User Access</a></span></li></ul></li><li tabindex="2"><span class="file"><a href="flavors.html">4.6. Flavors</a></span><ul><li tabindex="2"><span class="file"><a href="GET_getFlavors__version___accountId__flavors_.html">4.6.1. List Flavors</a></span></li><li tabindex="2"><span class="file"><a href="GET_getFlavorById__version___accountId__flavors__flavorId__.html">4.6.2. List Flavor By ID</a></span></li></ul></li></ul></li><li tabindex="2"><span class="file"><a href="go01.html">Glossary</a></span></li></ul></div></div><div id="searchDiv"><div id="search"><form onsubmit="Verifie(ditaSearch_Form);return false" name="ditaSearch_Form" class="searchForm"><fieldset class="searchFieldSet"><legend>Search</legend><center><input id="textToSearch" name="textToSearch" type="text" class="searchText"/> &nbsp; <input onclick="Verifie(ditaSearch_Form)" type="button" class="searchButton" value="Go" id="doSearch"/></center></fieldset></form></div><div id="searchResults"><center/></div><p class="searchHighlight"><a href="#" onclick="toggleHighlight()">Search Highlighter (On/Off)</a></p></div></div></div></div><script type="text/javascript" src="../common/jquery/jquery.qtip-1.0.0-rc3/jquery.qtip-1.0.0-rc3.min.js"><!--jQuery plugin for glossary popups. -->
$('a[title]').qtip({ style: { name: 'cream', tip: true } })
</script></body></html>