Implement endpoint `GET /api/v2/global-tasks` to get a paginated list of global tasks * [x] successful `GET` should return 200 * [x] field `data` should be present * [x] fields `data` should be [] when there are no elements * [x] field `total` should return 0 when there are no elements * [x] field `total` should return 1 when there is a customer * [x] it should accept `page`, `per_page` parameters * [x] it should accept `order_by` and `sort_dir` parameters * [x] it should return 400 when the field specified on `order_by` does not exist * [x] `fields last_page`, `current_page` and `next_page` should be present in result * [x] introduce a method at the business level * [x] use object `PaginationParameter` * [x] check returned object is uniform with other endpoints, use the correct schema object * [x] deprecate `GET /global/tasks/list` * [x] openapi: document endpoint * [x] openapi: deprecate `GET /global/tasks/list`
Implement endpoint
GET /api/v2/global-tasksto get a paginated list of global tasksGETshould return 200datashould be presentdatashould be [] when there are no elementstotalshould return 0 when there are no elementstotalshould return 1 when there is a customerpage,per_pageparametersorder_byandsort_dirparametersorder_bydoes not existfields last_page,current_pageandnext_pageshould be present in resultPaginationParameterGET /global/tasks/listGET /global/tasks/list