Getting Dashboard Data Via API
Question: Is there an API to retrieve dashboard-specific data (widgets, filters etc.)?
Solution: Of course there is - the Dashboards API v1.0
For example, you can retrieve a dashboard by ID:
http://localhost:8081/api/v1/dashboards/588149043aadeb6c43000012
Which will return a JSON containing various fields such as datasource (the cube used), filters, and layout.
The layout is comprised of cells, and alongside the UX properties like the cell's size, you can find the widget ID for each cell. Subsequently, you can find the dashboard's widgets like so:
http://localhost:8081/api/v1/dashboards/588149043aadeb6c43000012/widgets
Which will return an array of all widget objects, or a specific widget like so:
http://localhost:8081/api/v1/dashboards/588149043aadeb6c43000012/widgets/588149603aadeb6c43000015
Note: when specifying a widget's or dashboard's ID you need the "oid" property and not the "_id" property!
You can find more information about these APIs in our Online API Reference / V1 / Dashboards
Updated 02-13-2024
intapiuser
Admin
Joined December 15, 2022