-1

I want to run dashing dashboard with optional URL parameters, e.g.: "myGreatDashboard?filter=cars"

The idea is if I can reuse the same JOBS for the same dashboard with simply passing some url parameters which would change the data output.

I would need to access this parameter inside the jobs/*.rb script, is this possible? My guess is not, but just in case.

pdolinaj
  • 1,087
  • 13
  • 21

1 Answers1

0

There are two ways to get data into your dashboard. You can either use a Job (which can send data to your dashboard on a schedule using the send_event method) or you can use the API. The API is how your dashboard can be directly updated over HTTP, which is what you want here. By sending a request with URL parameters to the API, you can have the dashboard update in a particular way.

To update a particular widget, you can send a request to /widgets/widget_id. The body of the request needs to be proper JSON with at least your auth_token. The auth_token can be found in the config.ru file.

For example:

 { "auth_token": "some-string", "extraUrlParam": "xxx" }
Eric Terry
  • 364
  • 2
  • 10