That would be ok. In that case I would nest the other route under
`/dashboards`, so that the global namespace remains clean.

In most HTTP APIs, such filter will be probably just a query parameter
though. Like `/dashboards?filter=non-empty` (probably there is a better
naming). The order seems to be the same for both responses.

No need to change anything though. Promdash isn't a public API, so I'd
consider endpoint naming as private implementation detail.

In config/routes.rb:

> @@ -7,6 +7,8 @@
>    get '/w/:slug', to: 'single_widget#show'
>    post '/w', to: 'single_widget#create'
>    get '/embed/:slug', to: 'embed#show'
> +  get '/get_graphs', to: 'dashboards#get_graphs'
> +  get '/get_dashboards', to: 'dashboards#get_dashboards'

hmm k. Since the dashboards returned from dashboards#index is different
from this one (we don't return dashboards with nil for dashboard_json), I
think they should be different routes. Do you agree/disagree?

--
Reply to this email directly or view it on
GitHub<https://github.com/prometheus/promdash/pull/130/files#r11665683>
.