UI-support endpoints
These endpoints serve FlexMeasures’ own UI, which is deployed together with the server. They are not part of the official API, and not meant for external UIs, so they may change in any FlexMeasures version without notice. To build on FlexMeasures, use the official API (see Version 3.0).
Summary
Resource |
Operation |
Description |
|---|---|---|
Chart |
Download asset attributes for use in charts |
|
Download sensor attributes for use in charts |
||
Download a chart with time series |
||
Download annotations for use in charts |
||
Download time series for use in charts |
API Details
- GET /api/ui/asset/(id)
GET from /asset/<id>
- GET /api/ui/sensor/(id)
GET from /sensor/<id>
- GET /api/ui/sensor/(id)/chart
GET from /sensor/<id>/chart
Optional fields
“start” (legacy alias: “event_starts_after”; see the timely-beliefs documentation). May be given alone, or paired with “duration” to derive “end”.
“end” (legacy alias: “event_ends_before”; see the timely-beliefs documentation). May be given alone, or paired with “duration” to derive “start”.
“duration” (ISO 8601 duration format; provide together with “start” or “end” to derive the other bound)
“prior” (legacy alias: “beliefs_before”; see the timely-beliefs documentation)
“include-data” (legacy alias: “include_data”; if true, chart specs include the data; if false, use the GET /api/ui/sensor/(id)/chart_data endpoint to fetch data)
“chart-type” (legacy alias: “chart_type”; currently ‘bar_chart’ and ‘daily_heatmap’ are supported types)
“width” (an integer number of pixels; without it, the chart will be scaled to the full width of the container (hint: use
<div style="width: 100%;">to set a div width to 100%)“height” (an integer number of pixels; without it, FlexMeasures sets a default, currently 300)
- GET /api/ui/sensor/(id)/chart_annotations
GET from /sensor/<id>/chart_annotations
Annotations for use in charts (in case you have the chart specs already).
- GET /api/ui/sensor/(id)/chart_data
GET from /sensor/<id>/chart_data
Data for use in charts (in case you have the chart specs already).
Optional fields
“start” (legacy alias: “event_starts_after”; see the timely-beliefs documentation). May be given alone, or paired with “duration” to derive “end”.
“end” (legacy alias: “event_ends_before”; see the timely-beliefs documentation). May be given alone, or paired with “duration” to derive “start”.
“duration” (ISO 8601 duration format; provide together with “start” or “end” to derive the other bound)
“prior” (legacy alias: “beliefs_before”; see the timely-beliefs documentation)
“resolution” (see [docs about describing timing](https://flexmeasures.readthedocs.io/latest/concepts/time-series-and-beliefs.html#frequency-and-resolution))
“most-recent-beliefs-only” (legacy alias: “most_recent_beliefs_only”; if true, returns the most recent belief for each event; if false, returns each belief for each event; defaults to true)
- POST /api/ui/session/automations-page-child-assets
Remember whether the current user wants the asset automations page to list the automations of the assets below it, too.
- POST /api/ui/session/default-asset-view
Set which asset view the current user sees first when opening an asset, or go back to the system default.
- POST /api/ui/session/keep-legends-below-graphs
Set whether the current user’s charts keep their legends below the graphs, even for many sensors.
- POST /api/ui/session/status-page-child-jobs
Remember whether the current user wants the asset status page to list the jobs of the assets below it, too.
- POST /api/ui/session/status-page-tab
Remember which tab of the asset status page the current user last opened.