Quickstart
In this quickstart, we exchange your credentials for an access token, list your plants, and request today’s power and yield for one plant. Each step ends with the response you see.
Before you start
Section titled “Before you start”- API credentials from the SolarSENS team. If you do not have them yet, see Get access.
- An IP address registered with your account. The API rejects calls from other addresses.
All endpoints are under this base URL:
https://www.public.solarsens.co:8443/ava/public/api/v1Get an access token
Section titled “Get an access token”First, exchange your username and password for a token pair. The request is form-encoded, not JSON.
curl -X POST "https://www.public.solarsens.co:8443/ava/public/api/v1/login/access-token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "username=your_username&password=your_password"import requests
BASE = "https://www.public.solarsens.co:8443/ava/public/api/v1"
resp = requests.post( f"{BASE}/login/access-token", data={"username": "your_username", "password": "your_password"},)resp.raise_for_status()tokens = resp.json()access_token = tokens["access_token"]const BASE = "https://www.public.solarsens.co:8443/ava/public/api/v1";
const resp = await fetch(`${BASE}/login/access-token`, { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ username: "your_username", password: "your_password", }),});const tokens = await resp.json();const accessToken = tokens.access_token;The response contains both tokens:
{ "access_token": "eyJhbGciOiJIUzI1NiIsInR...", "token_type": "bearer", "refresh_token": "eyJhbGciOiJIUzI1NiIsInR..."}The access token is valid for 1 hour. When it expires, use the refresh token instead of signing in again. Long-running integrations can also use a non-expiring token. Authentication and access covers both.
List your plants
Section titled “List your plants”Now, request the plant list. Every data request carries the access token as a Bearer header. The plant list returns the plants that your account can query. Each plant has an id, which every other plant request uses, and a time zone.
curl "https://www.public.solarsens.co:8443/ava/public/api/v1/data/plant/list" \ -H "Authorization: Bearer $ACCESS_TOKEN"resp = requests.get( f"{BASE}/data/plant/list", headers={"Authorization": f"Bearer {access_token}"},)plants = resp.json()const resp = await fetch(`${BASE}/data/plant/list`, { headers: { Authorization: `Bearer ${accessToken}` },});const plants = await resp.json();[ { "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name": "DEMO-P001-Plant-1", "label": "DEMO-P001-Plant-1", "tz_offset": "+07:00", "country": "Vietnam", "plant_biz_model": "PPA Rooftop Zero Export", "plant_type": null, "string_count_per_scb": null }]An attribute that is not configured for a plant comes back as null.
Request KPI data
Section titled “Request KPI data”Last, ask for KPIs by name. This request asks for today’s active power and daily yield for one plant.
curl -X POST "https://www.public.solarsens.co:8443/ava/public/api/v1/data/plant/daily" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "plant_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "kpis": ["real_time_plant_active_power", "real_time_plant_daily_yield"] }'resp = requests.post( f"{BASE}/data/plant/daily", headers={"Authorization": f"Bearer {access_token}"}, json={ "plant_id": plants[0]["id"], "kpis": ["real_time_plant_active_power", "real_time_plant_daily_yield"], },)data = resp.json()const resp = await fetch(`${BASE}/data/plant/daily`, { method: "POST", headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json", }, body: JSON.stringify({ plant_id: plants[0].id, kpis: ["real_time_plant_active_power", "real_time_plant_daily_yield"], }),});const data = await resp.json();[ { "plant_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "date": "2025-03-17", "tz_offset": "+07:00", "data": { "real_time_plant_active_power": [ { "ts": "1742976300000", "value": "57.753" } ], "real_time_plant_daily_yield": [ { "ts": "1742974200000", "value": "936.61" } ] } }]Read the response by date and tz_offset. The API calculates the day window in the time zone of the plant. A KPI with no data for the day comes back as an empty list. An offline plant returns the same empty list.
Next steps
Section titled “Next steps”You now have a working token and real plant data. Go further with these pages:
- Plant data and Portfolio data list the full KPI catalogs and request options.
- Authentication and access covers token refresh, non-expiring tokens, subscription tiers, and error codes.
- The Swagger reference lets you try any endpoint in the browser.