Uploaded image for project: 'FlightPath'
  1. FlightPath
  2. FLPATH-762 Pagination, sorting and filtering support
  3. FLPATH-749

Pagination support from orchestrator-backend (v2)

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Purpose

      For https://issues.redhat.com/browse/FLPATH-693, we need endpoint providing required dataset in a scalable way. 

      Description

      Since the expected count of all processInstancess in the DB is beyond the limit feasible to download-all-to-browser solution, a new or the existing endpoint needs to provide:

      • sorting by all fields
      • filtering by text (in the Name, Workflow, Component fields)
      • pagination taking into consideration the filtering and sorting. In other words, once filtered and sorted, we need a way to get
        • total items count
        • request page number X of pageSize=N

      Solution

      Use query parameters in the request to identify following options:

      • pageSize
      • page
      • orderBy
      • orderDirection

      E.g.: http://localhost:7007/api/orchestrator/v2/workflows/instances?pageSize=10&page=2&orderBy=start&orderDirection=DESC

       

      Response structure for the /v2/workflows/instances & /v2/workflows/overview should be as below:

       

      {
          items: [],
          paginationInfo: {
              pageSize: 10,
              page: 2,
              totalCount: 50
          }
      }

              mlibra@redhat.com Marek Libra
              mlibra@redhat.com Marek Libra
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: