Ask Your Question

Revision history [back]

There are a couple of options here.

  • If retrieving the token is an idempotent operation, that is, you can do it many times a day without a problem, configure an HTTP Client origin in your pipeline to get the token from that URL, with the relevant headers, and then an HTTP Client processor to actually use the token against the Predix API.
  • If you can only call the token API once a day, then you'll need to use something like the Dev Random origin to drive the pipeline, then a script evaluator (Groovy / JavaScript / Jython) with logic to persist the token to a file on disk, and only retrieve it from the API when necessary. You could possibly skip the disk storage and just keep it in the state variable if you envisage the pipeline running continuously, so your script would retrieve it on pipeline start, and then every day.