Forum Discussion
I'm not sure what exceeds_total_count
is in this case, but you might be able to leverage that, if not you likely will have to check the size of data $entity.data.length
for whatever page size you're requesting.
If, for instance your page size is 100, you could put $entity.data.length >= 100
in your has next, and then your next url would have to be something like $url + "&offset=" + 100 * (snap.out.totalCount + 1)
since the next page is calculated before the output page is processed, so it will be one off. If on the other hand, you know how many pages you need specifically, you can set the has next to simply true
and then set the page limit in the snap settings.
I do know the total count as it comes back from each request. I've tried setting the has next to 'true' and then the total pages to fetch = &entity.total_count, but it complains that 'entity' is undefined for some reason. What am I missing?
- igormicev5 years agoContributor
Haven’t you looked with the Rest POST snap. Why do you must use the Rest Get with a payload? - not typical.
- ptaylor5 years agoEmployee
Please read this discussion:
Can you please be more specific about the REST API you’re calling? Is it from a 3rd party, or is it one you have control over? Is it exceedingly non-standard and non-REST-conforming for a GET request to require a payload.
- Toby5 years agoNew Contributor II
Yes, I agree but I have not control over it. It’s the List API here >>> Workspace API 2.0 | Databricks on AWS.
I’ve tried Post but the API isn’t listening for it, the only option is READ with a payload, which is trivial through code or tools such as Postman, but I can’t find a way through Snap. Any ideas welcome! Thanks.
- ptaylor5 years agoEmployee
Try passing the path and its value as a query parameter. Their documentation suggests this should work: