URL Filter Parameters to filter a dashboard dynamically right away

Hi all,

A feature suggestion I would like to put forward is the ability to pass in a filter value in the URL.

I would imagine this to be something like:
https://secure.holistics.io/dashboards/v3/37504-my-cool-dashboard?country=UK&product=car

This way you can launch a Holistics dashboard from another app, or provide a link to your users so they can jump right into a dashboard with context, rather than having to apply their own filters time after time.

This may feed into the existing feature request:

But I wanted to ensure this was raised and taken into account, especially if different.

Hi @DataGeekDude
Interesting. I think this one is most likely covered by the feature request:

1 Like

Thanks Abdel, however I think it isn’t fully covered as you wouldn’t want to create a view ahead of time on a dashboard, but allow that to be dynamic and be pushed in by an external system. Lots of BI tools allow this, even Google Data Studio provides this ability.

I wouldn’t want our users to have to go into Holistics to create a view with it’s own configuration etc. and then save the URL, that defeats the purpose of it being dynamic as far as I can see.

However, I may be reading the above link slightly wrong and this is what is intended.

@Khai_To Sorry for the direct tag on this one, but I am currently getting asked quite regularly on this functionality.

The main reason for us to have this is to “embed” links in other tools and allow those links to be opened with context i.e. our support/coaching team opening a link for one of our members pre-filtered via a URL parameter linked to a filter. This means they can open several tabs at the same time, just by clicking on a link, and getting the information right away.

There are many other reasons but this is the latest one which has been requested and at the moment we are looking to implement this in Google Data Studio instead, which does support this functionality :sob:

Hi @DataGeekDude,

Totally understand your use case and concern.
For now, all the filter value applied in the dashboard cannot be controlled via the URL but there are 2 options that I have thought of after the discussion with my engineering team

Option 1 (Not supported yet): We can expose the API for you to build filter URL parameter (the fstate param). Since this is not supported yet, we will consider this as a feature request and need to add to backlog for prioritization. I will check the ETA with team but it could be at around 3-4 weeks.

Option 2 (Workaround): You can generate the Embed Link for this use case. This option might require more effort from your side. Also, the embed links currently are not able to handle too many settings so if your dashboard has vast amount of filters, this option might not work.

What do you think? Which option will suit you?

Hi Khai,

Thanks for the reply and detailed info.

We would like to put in the feature request for the fstate param please. I believe this would be the best solution and open up a great deal of flexibility in Holistics.

Thanks!

Also, is it possible to get more details on what and how the fstate param would work? i.e. if you want to build a URL dynamically, how would that work?

Hi @DataGeekDude,

You can refer to our drafted API definition below:

Input:

Output:

  • fstate value

Then to construct the URL:
https://secure.holistics.io/dashboards/ <holistics_dashboard_version>/<dashboard_id>?fstate=<fstate_value_returned_by_api>

1 Like

That would be great! I think this would work great for us

1 Like

Hi @Khai_To

Can I check if this ever went onto the backlog and the likelihood of this being done?

We have a lot of use cases for this and it is IMO a basic feature that all BI tools should (and usually do) support.

Hi @DataGeekDude,

Yes, this has been added to our backlog and our development team is actively researching it.

I totally understand this feature has taken longer than expected to implement and release but we want to make sure your experience with it is seamless.
The expected timeline would be at around 1-2 weeks.

I will let you know when there is an update from my engineering team.

Thank you,

3 Likes

Thanks @Khai_To, I appreciate your update

1 Like

Hi Craig,

I’m glad to announce that Holistics has just released the API that allows users to generate Dashboard URLs dynamically based on the preset filters: https://docs.holistics.io/api/v2#tag/Dashboards/operation/Dashboards_BuildUrl :confetti_ball:

Please give the API a try and let us know whether it suits your needs.

Cheers!

2 Likes

Thanks @datbth thats really useful to see.

I had a look at the API docs, but is there any documentation on some examples of using this API?

Hi Craig,

Currently, there isn’t a full tutorial for this exact API yet.

But here is a quick example request:


May I ask which specific parts/steps are you having issues with, so that we can try to provide better examples/documentations for you?

It was really just getting started and how to proceed with the API as I wasn’t sure how the API would work to be honest.

Hi Craig,

While we are working on possible improvements to our docs, would you mind taking a look at this Get Reporting Data via API tutorial?
You can follow the exact first 3 steps, then

  • Step 4: Here is my version of step 4 for the build_url API

  • Step 5: Please omit step 5 and use the URL returned from step 4

Here is my codes for step 4:

class HolisticsAPI
  # ...

  # @return [string] the Dashboard URL that has been built
  def build_dashboard_url(dashboard_id, filter_states: [])
    url = @api_url + "/dashboards/" + dashboard_id.to_s + "/build_url"

    response = @http.post(url, json: { filter_states: filter_states })
    res = JSON.parse(response.to_s)

    if response.code == 200
      res['dashboard_url']
    else
      raise StandardError.new(res['message'])
    end
  end
end


# call the method to make request
filter_states = [
  {
    dynamic_filter_id: 2335, # Filter ID acquired from step 3
    condition: {
      operator: 'matches',
      values: [
        'last 2 months'
      ]
    }
  }
]
dashboard_url = build_dashboard_url(123, filter_states: filter_states)

Thanks for the additional detail. We will look to try this out internally at some point in the near future.

1 Like

Hi @DataGeekDude,

We’re thrilled to announce that our team has release the URL Parameters today :rocket:

From now on, you can easily pre-fill filters, period-over-period comparison, and date-drill by adding string parameters to the dashboard URL.

For more information, please visit our public documentation here: Passing Filter Parameters via URL Query String :blush: