Ask Your Question

Revision history [back]

There are a couple of options here:

  • Use an HTTP Client Origin in polling mode to 'drive' the pipeline, obtaining the access token for each batch, then an HTTP Client Processor later in the pipeline to use the access token to call the API. Use this option if it's ok to obtain a token repeatedly, as it will get a new token after every polling interval.
  • Use the Dev Random Origin to drive the pipeline, and a script evaluator (Groovy/JavaScript/Jython) to obtain the access token. The script would save the token in the state variable and only get it when the pipeline started, or if it is more than, say, 3000 seconds old. Again, you would use the HTTP Client Processor to make the actual API call. Use this option if getting the access token carries a 'cost' and you only want to do it when necessary.