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

- First the job call the GenerateTokenEndpoint to retrieve an access token for the session.
- The job computes the start and end date that will be used to call the interpolated API
- 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
- The CSV is uploaded into the desired Google Cloud Storage bucket
- The temporary file is deleted if the process is ok.