api-ref: Improve sort, pagination parameter docs
The various index APIs (e.g. 'GET /volumes') support two forms of sort parameter: the legacy 'sort_key'/'sort_dir' parameters and the combined 'sort' parameter. We were documenting different parameters in different APIs despite the fact all APIs support all parameters. In a similar vein, the various index APIs support the same three pagination parameters: 'offset', 'limit', and 'marker'. Once again, we were documenting these inconsistently. Correct both issues. Change-Id: Ia3300a8852825f7da830f7b1ed37b27625e267e9 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
ddcf394ae2
commit
a32e0b2aa6
@ -161,6 +161,8 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
@ -216,6 +218,8 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
@ -38,7 +38,10 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
|
||||||
|
|
||||||
@ -248,7 +251,10 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,6 +65,8 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
@ -405,7 +407,10 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
- with_count: with_count
|
- with_count: with_count
|
||||||
|
|
||||||
|
@ -116,6 +116,7 @@ Request
|
|||||||
|
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
|
- sort: sort_group_snapshot
|
||||||
- sort_key: sort_key_group_snapshot
|
- sort_key: sort_key_group_snapshot
|
||||||
- sort_dir: sort_dir_group_snapshot
|
- sort_dir: sort_dir_group_snapshot
|
||||||
- limit: limit_group_snapshot
|
- limit: limit_group_snapshot
|
||||||
@ -172,6 +173,7 @@ Request
|
|||||||
|
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
|
- sort: sort_group_snapshot
|
||||||
- sort_key: sort_key_group_snapshot
|
- sort_key: sort_key_group_snapshot
|
||||||
- sort_dir: sort_dir_group_snapshot
|
- sort_dir: sort_dir_group_snapshot
|
||||||
- limit: limit_group_snapshot
|
- limit: limit_group_snapshot
|
||||||
|
@ -213,6 +213,8 @@ Request
|
|||||||
|
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
@ -45,6 +45,8 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
@ -294,6 +296,8 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
@ -119,6 +119,8 @@ Request
|
|||||||
|
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
@ -468,8 +468,8 @@ service_binary_query:
|
|||||||
sort:
|
sort:
|
||||||
description: |
|
description: |
|
||||||
Comma-separated list of sort keys and optional
|
Comma-separated list of sort keys and optional
|
||||||
sort directions in the form of < key > [: < direction > ]. A valid
|
sort directions in the form of ``< key > [: < direction > ]``.
|
||||||
direction is ``asc`` (ascending) or ``desc`` (descending).
|
A valid direction is ``asc`` (ascending) or ``desc`` (descending).
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@ -478,6 +478,7 @@ sort_dir:
|
|||||||
Sorts by one or more sets of attribute and sort
|
Sorts by one or more sets of attribute and sort
|
||||||
direction combinations. If you omit the sort direction in a set,
|
direction combinations. If you omit the sort direction in a set,
|
||||||
default is ``desc``.
|
default is ``desc``.
|
||||||
|
Deprecated in favour of the combined ``sort`` parameter.
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@ -486,6 +487,7 @@ sort_dir_group_snapshot:
|
|||||||
Sorts by one or more sets of attribute and sort
|
Sorts by one or more sets of attribute and sort
|
||||||
direction combinations. If you omit the sort direction in a set,
|
direction combinations. If you omit the sort direction in a set,
|
||||||
default is ``desc``.
|
default is ``desc``.
|
||||||
|
Deprecated in favour of the combined ``sort`` parameter.
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@ -495,10 +497,20 @@ sort_dir_transfer:
|
|||||||
Sorts by one or more sets of attribute and sort
|
Sorts by one or more sets of attribute and sort
|
||||||
direction combinations. If you omit the sort direction in a set,
|
direction combinations. If you omit the sort direction in a set,
|
||||||
default is ``desc``.
|
default is ``desc``.
|
||||||
|
Deprecated in favour of the combined ``sort`` parameter.
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
min_version: 3.59
|
min_version: 3.59
|
||||||
|
sort_group_snapshot:
|
||||||
|
description: |
|
||||||
|
Comma-separated list of sort keys and optional
|
||||||
|
sort directions in the form of ``< key > [: < direction > ]``.
|
||||||
|
A valid direction is ``asc`` (ascending) or ``desc`` (descending).
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
min_version: 3.29
|
||||||
sort_key:
|
sort_key:
|
||||||
description: |
|
description: |
|
||||||
Sorts by an attribute. A valid value is ``name``,
|
Sorts by an attribute. A valid value is ``name``,
|
||||||
@ -506,6 +518,7 @@ sort_key:
|
|||||||
``id``, ``created_at``, or ``updated_at``. Default is
|
``id``, ``created_at``, or ``updated_at``. Default is
|
||||||
``created_at``. The API uses the natural sorting direction of the
|
``created_at``. The API uses the natural sorting direction of the
|
||||||
``sort_key`` attribute value.
|
``sort_key`` attribute value.
|
||||||
|
Deprecated in favour of the combined ``sort`` parameter.
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@ -516,6 +529,7 @@ sort_key_group_snapshot:
|
|||||||
``id``, ``created_at``, or ``updated_at``. Default is
|
``id``, ``created_at``, or ``updated_at``. Default is
|
||||||
``created_at``. The API uses the natural sorting direction of the
|
``created_at``. The API uses the natural sorting direction of the
|
||||||
``sort_key`` attribute value.
|
``sort_key`` attribute value.
|
||||||
|
Deprecated in favour of the combined ``sort`` parameter.
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@ -525,6 +539,16 @@ sort_key_transfer:
|
|||||||
Sorts by an attribute. Default is
|
Sorts by an attribute. Default is
|
||||||
``created_at``. The API uses the natural sorting direction of the
|
``created_at``. The API uses the natural sorting direction of the
|
||||||
``sort_key`` attribute value.
|
``sort_key`` attribute value.
|
||||||
|
Deprecated in favour of the combined ``sort`` parameter.
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
min_version: 3.59
|
||||||
|
sort_transfer:
|
||||||
|
description: |
|
||||||
|
Comma-separated list of sort keys and optional
|
||||||
|
sort directions in the form of ``< key > [: < direction > ]``.
|
||||||
|
A valid direction is ``asc`` (ascending) or ``desc`` (descending).
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
@ -365,7 +365,10 @@ Request
|
|||||||
|
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,6 +99,8 @@ Request
|
|||||||
|
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- marker: marker
|
- marker: marker
|
||||||
@ -150,6 +152,8 @@ Request
|
|||||||
|
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
@ -148,11 +148,12 @@ Request
|
|||||||
|
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
|
- sort: sort_transfer
|
||||||
|
- sort_key: sort_key_transfer
|
||||||
|
- sort_dir: sort_dir_transfer
|
||||||
- limit: limit_transfer
|
- limit: limit_transfer
|
||||||
- offset: offset_transfer
|
- offset: offset_transfer
|
||||||
- marker: marker_transfer
|
- marker: marker_transfer
|
||||||
- sort_key: sort_key_transfer
|
|
||||||
- sort_dir: sort_dir_transfer
|
|
||||||
|
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
|
@ -123,6 +123,8 @@ Request
|
|||||||
|
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- marker: marker
|
- marker: marker
|
||||||
@ -172,6 +174,8 @@ Request
|
|||||||
|
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
@ -63,6 +63,8 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
@ -195,6 +197,8 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
@ -440,6 +440,8 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- is_public: is_public_volume_type_query
|
- is_public: is_public_volume_type_query
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
@ -92,6 +92,8 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
@ -308,6 +310,8 @@ Request
|
|||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- all_tenants: all-tenants
|
- all_tenants: all-tenants
|
||||||
- sort: sort
|
- sort: sort
|
||||||
|
- sort_key: sort_key
|
||||||
|
- sort_dir: sort_dir
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: offset
|
- offset: offset
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
Loading…
Reference in New Issue
Block a user