cancel
Showing results for 
Search instead for 
Did you mean: 

REST GET with retries not working

kindminis
New Contributor

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

image

image

2 REPLIES 2

koryknick
Employee

@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
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: 

JC_0-1690469199038.png

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

@snap  Is that message still true and relevant?