Working efficiently with larger datasets
When fetching many charging sessions or consumption records, you do not want everything in a single response. The Leafy Energy API therefore uses pagination and filters.
Pagination
- Use query parameters such as
limitandcursor.
GET /v1/sessions?limit=100
GET /v1/sessions?cursor=NEXT_CURSOR_VALUE
Filters
- Filter by time range, site, device or status.
GET /v1/sessions?site_id=site_home_001&from=2024-01-01&to=2024-01-31
In demos you can show dashboards that fetch a small subset first and then load more data on scroll.
Comments
0 comments
Please sign in to leave a comment.