cancel
Showing results for 
Search instead for 
Did you mean: 

Do we have Pagination and items per page feature Snap

jshanaiah
New Contributor II

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 4

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.

jshanaiah
New Contributor II

@sriram The one u suggested is for using RESTFUL GET Client Snap.

Our use case , we are designing RESTFUL API in Snaplogic which should support pagination and item per page parameters.
Do we have existing Snap which support these features while calling Snaplogic RESTFUL GET API like https://elastic.snaplogic.com/api/1/rest/slsched/feed/Test/projects/gs/test-Execute

can we add page and items per page to above request?

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
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.