Forum Discussion

acatlan's avatar
acatlan
New Contributor II
3 years ago
Solved

Utilizing REST Get to Access Workable API

Hello,

I would like to seek assistance regarding an issue I’m facing with a REST Get snap in my integration workflow. I am using the snap to retrieve candidate data from the Workable API. Here is a screenshot of the JSON response:

In the SnapLogic documentation it mention we can use pagination to retrieve candidates in batches. However, I’m encountering a problem where it does not progress to the next batch of candidates. Here is a screenshot of the “Has Next” and “Next URL” settings:

I have referred to the Workable API documentation, which can be found at the following link:

I would greatly appreciate any assistance or guidance on how to properly utilize the pagination feature in the REST Get snap to retrieve the next batch of candidates.

Thank you for your support.

  • Hey @acatlan ,

    As per the workable document link you shared paging.next will contain the URL of the next result set.

    You need to make below changes:

    1. Has next should be an expression or a key that returns true or false. Below expression will check if the path exists in the response.

    $.hasPath(“$entity.paging.next”)

    In the Next URL, you need to use the URL that was provided in the $entiity.paging.next.

    You may need to adjust the URL or the expression as per your need.

    I hope this helps.

4 Replies

  • Hey @acatlan ,

    In the Has next input box, you are passing the value as a string, remove the quotes.

    Let us know if it works!

    • acatlan's avatar
      acatlan
      New Contributor II

      Hi @Soni37 ,

      When I remove the quotes I get the following:

      I can run it with the error but it doesn’t return the next batch.
      I’ve also ran it without the quotes and without the “=” sign selected it doesn’t return an error but it doesn’t go to the next batch.

      • Abhishek_Soni37's avatar
        Abhishek_Soni37
        Contributor

        Hey @acatlan ,

        As per the workable document link you shared paging.next will contain the URL of the next result set.

        You need to make below changes:

        1. Has next should be an expression or a key that returns true or false. Below expression will check if the path exists in the response.

        $.hasPath(“$entity.paging.next”)

        In the Next URL, you need to use the URL that was provided in the $entiity.paging.next.

        You may need to adjust the URL or the expression as per your need.

        I hope this helps.