cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API Test For Completion

jhagist
New Contributor III

I have a pattern where I run a REST POST api call and then need to run a REST GET to see if the request has completed. I need to somehow loop back to run the REST GET again if it isn’t done.

Recommendations on how to handle this pattern?

1 ACCEPTED SOLUTION

jhagist
New Contributor III

Incredible. It was right in front of me all along. 😎

So here are the pictures.

This is the API response. (in this case I need status = success. It tells me I can go get the data)

image

This is how I set up the Rest GET Snap. I have Has next set to try again if status <> success.

image

Hopefully this won’t be as painful for you as it was for me!!

View solution in original post

12 REPLIES 12

hi i’m wondering why your solution isnt working for me. same use case. but i am seeing it not waiting until there is a success as in this example:

image

Then the next step still shows the job status = “queued”
image

christwr
Contributor III

So aside from the REST GET snap that happens to have it’s own built-in next/loop within the snap itself, is there a recommended pattern for achieving a “while” type of loop within a pipeline? That’s the piece I was excited about from some of the examples when this thread started off, and sounded like more than one person somehow had it working. Interested in people’s tricks.

jhagist
New Contributor III

Not sure that this is what you are looking for but it looks promising.

Retry Snap

Wondering if anyone has used this? What was your use case?