Bug 1044270 - [RFE][keystone]: Re-introduce pagination
Summary: [RFE][keystone]: Re-introduce pagination
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: RFEs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact:
URL: https://blueprints.launchpad.net/keys...
Whiteboard: upstream_milestone_none upstream_stat...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-18 02:23 UTC by RHOS Integration
Modified: 2015-03-19 17:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-19 17:42:58 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description RHOS Integration 2013-12-18 02:23:53 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/keystone/+spec/pagination.

Description:

The current state of pagination is an unknown. There were supposed to be a session in IceHouse summit to *kill pagination* but it never materialized. The use cases for pagination remains.

1. A UI (i.e. Horizon) for Keystone needs an intuitive and consistent way to list the resources via public APIs.
2. Users need an intuitive and consistent way to list the resources via public APIs without having the cloud providers to open up their database for them. This is not just about reporting and auditing.

The arguments against pagaination is well understood.

1. Pagination is open to abuse. For example, if a Keystone backend, misconfigured or otherwise, may take a long time to satisfy a generic query and could potentially return massive amount of data.
2. Pagination may hurt user experience. See http://lists.openstack.org/pipermail/openstack-dev/2013-August/013582.html

However, neither are showstoppers for pagination. Yes, anything is open to abuse if cloud providers/operators are not careful. Same goes with performance, security, supportability, etc. A user who interacts with two different cloud providers may come away with vastly different user experience, even if the cloud providers are using the same OpenStack code. From API perspective, pagination is needed and useful to have.

Lets re-introduce the pagination parameters ``page`` and ``per_page``. 

``page`` indicates the current page the user is seeking. It must be a positive integer. It is an optional parameter for the listing APIs. If absent, it is always default to ``1``. An implementation may also impose an upper limit on it. If the given ``page`` exceeds the imposed limit, an implementation must response with an HTTP code 400 (Bad Request).

``per_page`` indicates the number of items per page. It must be a positive integer. It is an optional parameter for the listing APIs. If absent, an implementation must set a default value. An implementation may also impose an upper limit on it. If the given ``page`` exceeds the imposed limit, an implementation must response with an HTTP code 400 (Bad Request).


The imposed limit should alleviate the concerns with abuse and user experience.

Examples:

GET /v3/users?page=3,per_page=10

Specification URL (additional information):

None


Note You need to log in before you can comment on or make changes to this bug.