Skip to content

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.

  • 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/v1

First, exchange your username and password for a token pair. The request is form-encoded, not JSON.

Terminal window
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"

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.

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.

Terminal window
curl "https://www.public.solarsens.co:8443/ava/public/api/v1/data/plant/list" \
-H "Authorization: Bearer $ACCESS_TOKEN"
[
{
"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.

Last, ask for KPIs by name. This request asks for today’s active power and daily yield for one plant.

Terminal window
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"]
}'
[
{
"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.

You now have a working token and real plant data. Go further with these pages: