K-Phoen / grabana

User-friendly Go library for building Grafana dashboards
MIT License
680 stars 69 forks source link

feat(folders): use API search endpoint for testing folder existence #262

Closed ffapitalle closed 2 months ago

ffapitalle commented 3 months ago

Uses the API search endpoint to check if a dashboard folder exists.

Former API endpoint returns only root level folders.

This is meant to be a step forward into the full support of nested folders mentioned in #261 .

joeblubaugh commented 2 months ago

I believe this needs a change to add an additional query paramter: /api/search?type=dash-folder. Otherwise, dashboards will also be returned by the search API.

K-Phoen commented 2 months ago

Merged, thanks for the PR :)