Forum Discussion

kindminis's avatar
kindminis
New Contributor
3 years ago

REST GET with retries not working

I have a REST GET snap with an authorization header holding an access token which is making a call to see if a job is done with a status code that is either Submitted or Completed. I want it to retry the same URL with the authorization header until the code is Completed, then grabs an S3 url. However, I cannot get the retry to work using has next/next URL.

Has Next:
jsonPath($, “$entity.data.attributes.status.code”) != ‘Completed’

Next URL:
“https://…/v2/jobs/” + $job_id

2 Replies

  • kindminis - I think your Has Next property is not correct.  The easiest way to test it is to put a Filter snap after your Rest Get and test the expression.  Once you have it working as expected, just copy and past the expression back into the Has Next property.

    If I were to wager a guess, I think the value you want is simply:

    $entity.data.attributes.status.code != 'Completed'

    Hope this helps!

  • JC's avatar
    JC
    New Contributor II

    Not sure if everyone noticed but sometime this year the documentation on the REST GET snap and HTPP client were updated to say this: 

    Since this, any new pipeline development has been with HTTP client snap. 

    snap  Is that message still true and relevant?