Forum Discussion

martinangelov's avatar
martinangelov
Cloud Apps
09-19-2024

Filter widgets types

Hi all,

Trying to figure out how to filter widgets based on their types. For example, let's say we have 50 dashboards where each has 7 widgets. Question is is there a way to filter out based on the type widgets (i.e n amounts of bar charts, n amounts of pie charts, etc)

Problem arises with widgets that are using certain type which will soon become deprecated, thus need to change all widgets that are currently set with this type. One way is of course seeing one by one which is broken, however if possible I would like to avoid this and change all widgets that will soon become problematic to another type.

Thank you

6 Replies

  • Maybe try exporting all the dashboards as ".dash" files? These can be examined/edited in any plaintext editor like Notepad++, so presumably you could do a control-F (find) for the widget types in question. The challenge would be doing this in a timely manner. If you're using Notepad++, you could try opening all of the dash files at the same time, then using the "Find All in All Opened Documents" option, but this might not be very feasible if you have a ton of dash files. Aside from that, though, I'm not sure of an expedient way to search them all quickly; worse case, you'd have to check each file individually, but if you're doing that then you might as well just open each dashboard one-by-one directly in Sisense 😛

    • martinangelov's avatar
      martinangelov
      Cloud Apps

      Hi Jake_Raz ,

      Thank you for your input.  Have started doing it the way you proposed  while in parallel looking into the suggestion on retrieving the widgets types by API.

      • AssafHanina's avatar
        AssafHanina
        Sisense Employee

        hey martinangelov ,

        I’m sharing the information provided by the CSM to summarize the suggested solution.

        The recommended API endpoint is 1.0 GET​/dashboards​/{dashboardId}​/widgets. This endpoint provides details on each widget, including the widget type, for the specified dashboardId

        Proposed Script Solution Workflow:

        1. Generate a list of all dashboardId.
        2. Specify the fields to retrieve in the API call: oid, title, type, and subtype.
        3. Execute a GET request for each dashboardId in the list.
        4. Export the resulting data into a CSV file.

        Example Output

        Best Regards

    • martinangelov's avatar
      martinangelov
      Cloud Apps

      Hi DRay ,

      Thank you for the response, if possible some steps on how to do it would be much appreciated.

      Thank you 

      • DRay's avatar
        DRay
        Admin

        Hi martinangelov,

        I reached out to your account team to have them connect you with a technical resource.