Quickstart
This guide takes you from credentials to your first data response.
Before you start
Section titled “Before you start”- API credentials from the SolarSENS team — see Get access if you don’t have them yet.
- Requests must come from an IP address registered with your account; calls from other addresses are rejected.
All endpoints live under the base URL:
https://www.public.solarsens.co:8443/ava/public/api/v11. Get an access token
Section titled “1. Get an access token”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; refresh it with the refresh token rather than logging in again. For long-running integrations there is also a non-expiring token option. Both are covered in Authentication and access.
2. List your plants
Section titled “2. List your plants”Every data request carries the access token as a Bearer header. Start with the plant list — it returns the plants your account can query, including each plant’s id (used in every other plant request) and 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 }]Attributes that are not configured for a plant come through as null.
3. Request KPI data
Section titled “3. Request KPI data”Ask for specific KPIs by name. Here: 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 day window is computed in the plant’s own time zone. A KPI with no data for the day comes back as an empty list, which is also what an offline plant returns.
Next steps
Section titled “Next steps”- Full KPI catalogs and request options: Plant data and Portfolio data.
- Token refresh, non-expiring tokens, subscription tiers, and error codes: Authentication and access.
- Try any endpoint interactively in the Swagger reference.