This job shows how to retrieve data using the MES Unified APIs. This set of API is developed by the MES team and it provides a unique entry point to retrieve data from different MES systems. The job shows how you can retrieve interpolated values for a given list of tags.

A complete explanation of the unified APIs can be found here.

JOB DESCRIPTION

  1. First the job call the GenerateTokenEndpoint to retrieve an access token for the session.
  2. The job computes the start and end date that will be used to call the interpolated API
  3. The job reads a Google Sheet containing a list of tag. Per each tag an HTTP call to the interpolated API endpoint is made and the result are appended into a temporary CSC
  4. The CSV is uploaded into the desired Google Cloud Storage bucket
  5. The temporary file is deleted if the process is ok.
  • No labels