You can use the m3ter file upload service to upload a measurements data file to the platform in preparation for measurements ingest:
You can upload measurements files in
CSV text formats or upload zipped files and you must specify the file content type when you request an upload URL.
An upload job ID is returned with the upload URL and you can use this upload job ID for other file upload service calls to follow up and troubleshoot any issues that arise with a file upload.
This is a two-stage process:
1. First, obtain an upload URL from the m3ter platform by making a POST request to this endpoint:
The request body for this call should have the following structure:
contentLength parameter values you use will be specific to the file you intend to upload. In the response, the call will return:
An upload URL, which is time limited - it is valid for one minute.
An upload job ID.
Note: Authentication with Platform. To make the POST generateUploadUrl API call, you'll have to use a Bearer Token you've obtained for authentication with the platform. For more details, see Service Authentication.
More Details? See the API Reference documentation for the Generate an upload URL API call.
2. Second, when you have received the response to your request for an upload URL, you can upload the data in your file using a PUT request to the returned upload URL. The binary data from the file should form the request body and the file should contain an array of measurements data. For example:
If any issues occur with your measurements data file upload, file upload service API calls are available to help you follow up and troubleshoot.
More Details? For more details on how to make the API calls referred to in this section, see the Measurements section of our API Reference documentation.
You can retrieve a measurements file that you've previously uploaded to the file upload service:
Follow a two-step process:
Use this call with the file upload job id to obtain a download URL. A download URL is returned together with a download job id.
You can then use a GET using the returned download URL as the endpoint to retrieve the previously uploaded file.
You can use two calls to obtain details of file upload jobs:
List File Upload Jobs - use this call to return a list of the file upload jobs.
Get File Upload Job Response - use this call to get the file upload job response using the file upload job id. This returns useful information about the specific upload job, including it's status - "notUploaded", "running", "failed", or "succeeded".