Getting data from a "two prong" API - request + polling for status


Is it possible to get data from an API whose response is not the data itself, but rather a token that you need to check (for status, i.e.: when the query is complete) and then you can use the token to retrieve the data?

For example, sumologic has this behavior in their APIs.

Hey @chudel, welcome to the community :hugs:

Totally, you could use one query to get your token and then pass that token to another query that retrieves your data.

Rough overview:

  • JS Query 1 hits the api and gets a token back
  • JS Query 1 passes that token to JS Query 2 (via additionalScope)
  • JS Query 2 fetches your data

Does that help?

Thanks. I will try it out.

1 Like