cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Not able to configure the HAS NEXT with HTTP Client snap

terrible_towel
New Contributor II

Here's the response from my request:

terrible_towel_0-1704628952195.png

There's nothing for me to work with, since only total_count is being returned. The $entity in the header doesn't return the properties I need to cycle through the pages (offset property, 0 by default).

I've tried the "snap.out.totalCount" but it seems I can't properly configure that. Can someone help me with setting up the next page?

I am able to do it in Postman, adding a "&offset=X" to the endpoint.

Thanks!

 

1 ACCEPTED SOLUTION

These settings should do it, as long as you set the offset to 0 in the "query parameters" section, you should be in the clear

ddellsperger_0-1704648436313.png

 

View solution in original post

7 REPLIES 7

These settings should do it, as long as you set the offset to 0 in the "query parameters" section, you should be in the clear

ddellsperger_0-1704648436313.png

 

I've changed the '100' to '1k', since that's the API batch size, and it worked like a charm, thank you @ddellsperger !

I still have some questions if I may, since I'm not too familiar with the 'snap.out' property. I tend to fail at trying to read the values of this property during validation and see what it holds to get a better understanding, is that impossible? Another thing is the $entity property being accessible in the 'Has Next' clause but not in the others, can you elaborate on that please?

The snap properties have documentation available here https://docs-snaplogic.atlassian.net/wiki/x/ovYV (these are built-in properties for all snaps). As far as the reason some properties are available on the input and or output, at least the design of this snap anything that's used for the initial request to the endpoint will not support the output document paths, the only places where we support the output document path is in the pagination parameters as those will typically rely on the output of the result in order to operate. Generally snaps will not use the output document for evaluation mostly because most snaps end their execution cycle at the point of receiving a response from the servers, then they are set to format to the final output document from there.