Forum Discussion

jshanaiah's avatar
jshanaiah
New Contributor II
7 years ago

Do we have Pagination and items per page feature Snap

We are building GET Restful API which gets data from DB.

Is there out of the box Snap providing pagination and number of items processing snap
For example /person/test?page=1&ipp=50

4 Replies

  • sriram's avatar
    sriram
    Former Employee

    By using a combination of the “Has Next”, “Next URL” and “Pagination interval” properties available on the Rest Get Snap, you should be able to paginate through multiple pages of results being returned as part of the GET request. Please refer to examples #4 through #6 that shows how these properties are typically setup based on the endpoint you are trying to connect to.

    • sriram's avatar
      sriram
      Former Employee

      As a way of designing your pipelines, this should be possible. You can define pipeline parameters and as an example, one of the parameters could be number of pages to retrieve data from. Value for this parameter can be passed at time of invoking the pipeline (through the task URL) which can then be used as part of the Rest Get Snap.

  • jshanaiah's avatar
    jshanaiah
    New Contributor II

    Thanks @sriram… We can use pipeline parameter and then once we get data from DB.

    We can apply filter or pagination and send back results.