Hands-on20 min
Hands-on: Read All 10 Sandbox Devices
📡 Module 2: Connect & Read Primitives
Hands-on: Read All 10 Sandbox Devices
Open your terminal. Set your API key. Read every device.
Setup
# Set your API key as an environment variable
export EAT_KEY="eat_test_YOUR_KEY_HERE"
# Verify connectivity
curl -s -o /dev/null -w "HTTP %{http_code}\n" \
-H "Authorization: $EAT_KEY" \
https://app.energyatit.com/api/v1/sites
# Expected: HTTP 200# Set your API key as an environment variable
$env:EAT_KEY = "eat_test_YOUR_KEY_HERE"
# Verify connectivity
curl.exe -s -o NUL -w "HTTP %{http_code}" -H "Authorization: $env:EAT_KEY" "https://app.energyatit.com/api/v1/sites"
# Expected: HTTP 200Exercise 1: Discover the Site
curl -s -H "Authorization: $EAT_KEY" \
https://app.energyatit.com/api/v1/sites | python3 -m json.toolcurl.exe -s -H "Authorization: $env:EAT_KEY" "https://app.energyatit.com/api/v1/sites" | ConvertFrom-Json | ConvertTo-Json -Depth 10Note the site ID (usually 1 for sandbox).
Exercise 2: List All Assets
curl -s -H "Authorization: $EAT_KEY" \
"https://app.energyatit.com/api/v1/assets?site_id=1" | python3 -m json.toolcurl.exe -s -H "Authorization: $env:EAT_KEY" "https://app.energyatit.com/api/v1/assets?site_id=1" | ConvertFrom-Json | ConvertTo-Json -Depth 10Count: you should see 10 assets. Note each asset's id and type.
Exercise 3: Read Grid Connections
# List grid connections
curl -s -H "Authorization: $EAT_KEY" \
https://app.energyatit.com/api/v1/grid-connections/1 | python3 -m json.tool
# Get meter readings
curl -s -H "Authorization: $EAT_KEY" \
https://app.energyatit.com/api/v1/grid-connections/1/readings | python3 -m json.tool# List grid connections
curl.exe -s -H "Authorization: $env:EAT_KEY" "https://app.energyatit.com/api/v1/grid-connections/1" | ConvertFrom-Json | ConvertTo-Json -Depth 10
# Get meter readings
curl.exe -s -H "Authorization: $env:EAT_KEY" "https://app.energyatit.com/api/v1/grid-connections/1/readings" | ConvertFrom-Json | ConvertTo-Json -Depth 10Exercise 4: Check Asset Reliability
# Get reliability score for asset 1
curl -s -H "Authorization: $EAT_KEY" \
https://app.energyatit.com/api/v1/intel/asset/1/reliability | python3 -m json.tool# Get reliability score for asset 1
curl.exe -s -H "Authorization: $env:EAT_KEY" "https://app.energyatit.com/api/v1/intel/asset/1/reliability" | ConvertFrom-Json | ConvertTo-Json -Depth 10Exercise 5: Check Integration Status
curl -s -H "Authorization: $EAT_KEY" \
https://app.energyatit.com/api/v1/integrations/status | python3 -m json.toolcurl.exe -s -H "Authorization: $env:EAT_KEY" "https://app.energyatit.com/api/v1/integrations/status" | ConvertFrom-Json | ConvertTo-Json -Depth 10Verification
You have read from all 10 sandbox devices if you see data for: 2 BESS, 2 HVAC, 2 EV, 2 solar, 1 DR, 1 meter. Mark this lesson complete.
Open Hands-on Lab
Complete the exercise in the Developer Hub.
Log in to track your progress and earn certifications.