From f248b5d9b794d5bdff59145406e0398d6fdcafa4 Mon Sep 17 00:00:00 2001 From: "rajesh.kumar" Date: Tue, 25 Apr 2023 11:58:35 +0530 Subject: Support pagination in query across all anchors(ep4) Add pagination query parameters in query across all anchors API pagination parameters (pageIndex and pageSize) are optional default is to query all fragments each pageSize represents number of records(number of anchors) TotalRecords is returned in response header to find number of pages. - If pagination option is provided in request then query number of anchors equal to pageSize. pageIndex is used for setting offset. - return number of records(one anchor per record) as per pagesize and pageSize Issue-ID: CPS-1605 Change-ID: I73f97f986a817d423f93a8d922dcd9647b2504bc Signed-off-by: rajesh.kumar --- docs/api/swagger/cps/openapi.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/api/swagger/cps/openapi.yaml b/docs/api/swagger/cps/openapi.yaml index ace45f8447..12b438a3e6 100644 --- a/docs/api/swagger/cps/openapi.yaml +++ b/docs/api/swagger/cps/openapi.yaml @@ -2359,6 +2359,20 @@ paths: default: none example: "3" type: string + - description: "page index for pagination over anchors" + name: pageIndex + in: query + required: false + schema: + type: integer + minimum: 1 + - description: "number of records (anchors) to query per page" + name: pageSize + in: query + required: false + schema: + type: integer + minimum: 1 responses: "200": content: @@ -2370,6 +2384,11 @@ paths: schema: type: object description: OK + headers: + total-pages: + schema: + type: integer + description: Total number of pages for given page size "400": content: application/json: @@ -2749,4 +2768,4 @@ components: securitySchemes: basicAuth: scheme: basic - type: http + type: http \ No newline at end of file -- cgit 1.2.3-korg