Forum Discussion

merrittMelker's avatar
merrittMelker
Data Storage
03-06-2025

Fetching full dashboard definitions efficiently

The issue: Fetching full dashboard definitions efficiently.

  • /api/v1/dashboards?expand=widgets returns full definitions but can't be filtered by OIDs.
  • /api/v1/dashboards/{dashboardId}?expand=widgets allows per-dashboard retrieval but requires Admin role for full data, which seems like a defect.
  • /api/v1/dashboards/{dashboardId} + /api/v1/dashboards/{dashboardId}/widgets might work but requires merging results, which we’d like to avoid.

Is there a way to retrieve full dashboard definitions in a single call for a filtered list of OIDs? Also, could /dashboards/export be a viable alternative?

3 Replies

  • steve's avatar
    steve
    Sisense Employee

    Hi merrittMelker 

    I think the 3rd option in your list may be your best shot. This is how we do it inside Compose SDK e.g useGetDashboardModel 

    In terms of network traffic efficiency, on the first call you may also include a fields list so only the ones you need for  using in your code are returned e.g. /api/v1/dashboards/{dashboardId}?fields=oid,title,datasource,filters

    Hope that helps

    Steve

  • Hello merrittMelker ,

    I’m following up to see if the solution offered by steve worked for you.

    If so, please click the 'Accept as Solution' button on the appropriate post. That way other users with the same questions can find the answer. If not, please let us know so that we can continue to help.

    Thank you.

  • Hello @merrittMelker ,

    I’m following up to see if the solution offered by @steve worked for you.

    If so, please click the 'Accept as Solution' button on the appropriate post. That way other users with the same questions can find the answer. If not, please let us know so that we can continue to help.

    Thank you.