Building Meter Level Usage Data CSVs
How to build a CSV file that contains the meter level usage you are interested in.
Overview
The Dashboard allows you to download site usages for multiple sites. To do that, you will need to navigate to the site tab of the Consumption page, select the sites you want to download usages for, and click the "Download selected" button. The downloaded CSV will contain meter-level usages for the selected sites.
Sometimes, it might be easier for you to build your own CSV download via API rather than navigating to it through the Dashboard UI. This Guide will show you step-by-step how you can build your own CSV file.
Example Workflow
Goal
Create a CSV file of all meter level usages for a selection of Sites
Downloading via API is a two-step process
Step 1: prepare the download by specifying what you want to download e.g. statements for multiple accounts, statements for a single account, credentials, meter and statements for multiple sites, and statements for multiple sites.
Step 2: fetch the file download
Steps
- Get all relevant
entityId
s for the Sites you want to obtain usage data for by using the GET List Sites endpoint. - Get the
entityId
s for all meters in the Sites from step 1.- Use the GET List Meters endpoint and specify the
search
query parameter with thesiteId
from step 1. - You can build the
search
query with this Guide.
- Use the GET List Meters endpoint and specify the
- Create the download request.
Add the array ofmeterId
s from step 2 to the download request by using the GET Download Meter Usage endpoint.
⚠️ Note that the maximum number ofmeterId
is 500. If you need to download data for more than 500meterId
s, you will need to make multiple requests. However, size of the download does not impact the execution of this endpoint. - Get the downloadable CSV file.
- Option 1: Poll for the status of the download request until you are able to download the CSV.
- The response body in step 3 will give you a url.
- Take the
id
part of the url and use that as thedownloadReqeuestWebhookId
in the GET Stream Download endpoint.- For example, if the url is https://api-uat.urjanet.com/utility/downloads/1ee00c3f-f862-ddaa-aee3-8eb7ef1e8bdav0b9,
1ee00c3f-f862-ddaa-aee3-8eb7ef1e8bdav0b9
will be theid
you should use.
- For example, if the url is https://api-uat.urjanet.com/utility/downloads/1ee00c3f-f862-ddaa-aee3-8eb7ef1e8bdav0b9,
- If the download is not yet ready, Arcadia will return a 202.
- Poll this endpoint until Arcadia returns a 200 which indicates that the download is ready.
- Option 2: Wait for the file to be emailed to you.
- When the CSV file is ready for you to download, we will send you an email with a link for the download. The email we will send the download link to is the email of the org user who created the auth token for the API request.
- Option 1: Poll for the status of the download request until you are able to download the CSV.
How long do downloads take?
If you are downloading close to 500 meters usage data, please expect the download to take around an hour.
Updated 11 months ago