Forum Academy Marketplace Showcase Pricing Features

How to retrieve JSON data from randomly generated URL in an API request

Hi all,

Very new to bubble and trying to build out my first API workflow.

I have an external API that I’m connecting to which generates a screenshot.

The way it does this, is in the first request to the API, it returns a JSON response like so:

{
  "status": "created",
  "renderId": "7869f399-4028-4605-a0ff-3c250e37f6bc",
  "statusUrl": "https://the-api-service.com/7869f399-4028-4605-a0ff-3c250e37f6bc"
}

The part I don’t know how to do, is how do I visit the statusURL value and grab the data on that page?

The statusURL is a URL that contains a JSON response with the actual screenshot URL, something like this:

{
  "renderId":"7869f399-4028-4605-a0ff-3c250e37f6bc",
  "status":"succeeded",
  "renderUrl":"https://www.api-service.com/image-name.jpg"
}

My end goal is to be able to “poll” the statusURL until the JSON states that “status=succeeded” and the renderURL is available to save to my database.

Thanks Bubblers!