Pagination support for Mistral List API

Registered by Lingxian Kong

Motivation
=========
After discussion with zhenguo and melisha in mistral team, the main requirement from mistral dashboard to mistral api service, is pagination.

Proposed Change
==============
Add pagination support for all mistral resources list query, add params below:

* limit: return a maximun number of items at a time, default is None, the
  query result will include all the resource items, which is backward
  compatible.

* marker: the ID of the last item in the previous list.

* sort_keys: columns to sort results by. Default: created_at.

* sort_dirs: directions to sort corresponding to sort_keys, "asc" or
  "desc" can be choosed. Default: asc. The length of sort_dirs can
  be equal or less than that of sort_keys.

You could refer to more examples in https://etherpad.openstack.org/p/rich-query-for-mistral

Blueprint information

Status:
Complete
Approver:
Renat Akhmerov
Priority:
High
Drafter:
Lingxian Kong
Direction:
Approved
Assignee:
Lingxian Kong
Definition:
Approved
Series goal:
Accepted for liberty
Implementation:
Implemented
Milestone target:
milestone icon 1.0.0
Started by
Lingxian Kong
Completed by
Renat Akhmerov

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/mistral-query-enhancement,n,z

Addressed by: https://review.openstack.org/202572
    Add pagination support for workflows query API

Addressed by: https://review.openstack.org/203406
    Add functional tests for workflow query

Addressed by: https://review.openstack.org/205733
    Add processed filed in task query response

rakhmerov: Also need to think how to do flexible filtering. Have you thought about it?
melisha: A good reference for flexible filtering is OData http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#FilterSystemQueryOption

Gerrit topic: https://review.openstack.org/#q,topic:bp/mistral-pagination-support,n,z

Addressed by: https://review.openstack.org/214954
    Add pagination support for actions query API

Addressed by: https://review.openstack.org/216204
    Add pagination support for executions query API

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.