Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-15809] Pagination of Tasks List API
Summary: Add an API to support pagination of Tasks list API POST API: `http://localhost:9000/api/v1/customers/f33e3c9b-75ab-4c30-80ad-cba85646ea39/tasks_list/page` Request body: ` {"sortBy":"createTime","direction":"DESC","filter":{},"limit":10,"offset":0,"needTotalCount":true}` Supported filter params: # dateRangeStart; # dateRangeEnd; # targetList; # targetUUIDList; # typeList; # typeNameList; # status; Test Plan: Response body for `{"sortBy":"createTime","direction":"DESC","filter":{"typeList": ["Create"]},"limit":10,"offset":0,"needTotalCount":true}` ``` { "entities": [ { "id": "d1ffc733-17a5-4415-ae17-d1c6905f6c6e", "title": "Created Provider : dkumar-cli", "percentComplete": 100, "createTime": "2024-11-15T19:18:39Z", "completionTime": "2024-11-15T19:18:56Z", "target": "Provider", "targetUUID": "55fd63e4-7b66-401f-86fa-074da43a6a02", "type": "Create", "typeName": "Create", "status": "Success", "details": { "taskDetails": [ { "title": "Bootstrapping Cloud", "description": "Set up AccessKey, Region, and Provider for a given cloud Provider.", "state": "Success", "extraDetails": [] }, { "title": "Bootstrapping Region", "description": "Set up AccessKey, Region, and Provider for a given cloud Provider.", "state": "Success", "extraDetails": [] }, { "title": "Creating AccessKey", "description": "Set up AccessKey in the given Provider Vault", "state": "Success", "extraDetails": [] }, { "title": "Configuring", "description": "Applying the configuration.", "state": "Success", "extraDetails": [] }, { "title": "Initializing Cloud Metadata", "description": "Initialize Instance Pricing and Zone Metadata from Cloud Provider", "state": "Success", "extraDetails": [] } ] }, "abortable": false, "retryable": false, "correlationId": "d2fc9ab6-cb21-4073-89b3-f1f82e5ef58d", "userEmail": "admin" }, { "id": "904abdd1-db51-4aea-a150-736e665851b6", "title": "Created Provider : dkumar", "percentComplete": 100, "createTime": "2024-10-17T11:59:40Z", "completionTime": "2024-10-17T11:59:40Z", "target": "Provider", "targetUUID": "d68fef15-df24-4ca0-992a-90d51c5ffb11", "type": "Create", "typeName": "Create", "status": "Success", "details": { "taskDetails": [] }, "abortable": false, "retryable": false, "correlationId": "31cef417-3a16-4291-bfba-862fac579e5f", "userEmail": "admin" }, { "id": "5ef91eff-2161-4978-82d8-6b84bf7c9bdb", "title": "Created Provider : dkumar-onprem", "percentComplete": 100, "createTime": "2024-10-17T11:36:05Z", "completionTime": "2024-10-17T11:36:21Z", "target": "Provider", "targetUUID": "0f032006-e898-4a66-ac59-b4f8b17f1187", "type": "Create", "typeName": "Create", "status": "Success", "details": { "taskDetails": [ { "title": "Bootstrapping Region", "description": "Set up AccessKey, Region, and Provider for a given cloud Provider.", "state": "Success", "extraDetails": [] }, { "title": "Creating AccessKey", "description": "Set up AccessKey in the given Provider Vault", "state": "Success", "extraDetails": [] } ] }, "abortable": false, "retryable": false, "correlationId": "2766fa96-a9f0-47f0-871a-b36fde2e4dc0", "userEmail": "admin" }, { "id": "b8b6e786-9782-4a66-a60e-afd24fe9ee9e", "title": "Created Provider : dkumar", "percentComplete": 100, "createTime": "2024-09-16T06:08:23Z", "completionTime": "2024-09-16T06:08:38Z", "target": "Provider", "targetUUID": "d93ea39b-f660-4d8d-b103-4687272e8e75", "type": "Create", "typeName": "Create", "status": "Success", "details": { "taskDetails": [ { "title": "Bootstrapping Cloud", "description": "Set up AccessKey, Region, and Provider for a given cloud Provider.", "state": "Success", "extraDetails": [] }, { "title": "Bootstrapping Region", "description": "Set up AccessKey, Region, and Provider for a given cloud Provider.", "state": "Success", "extraDetails": [] }, { "title": "Creating AccessKey", "description": "Set up AccessKey in the given Provider Vault", "state": "Success", "extraDetails": [] }, { "title": "Configuring", "description": "Applying the configuration.", "state": "Success", "extraDetails": [] }, { "title": "Initializing Cloud Metadata", "description": "Initialize Instance Pricing and Zone Metadata from Cloud Provider", "state": "Success", "extraDetails": [] } ] }, "abortable": false, "retryable": false, "correlationId": "6b541ae0-fa87-4da0-8da4-72a74e0116d6", "userEmail": "admin" } ], "hasNext": false, "hasPrev": false, "totalCount": 4 } ``` Reviewers: #yba-api-review, nsingh, sneelakantan Reviewed By: #yba-api-review, nsingh, sneelakantan Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D41284
- Loading branch information