Closed davidnewhall closed 1 year ago
The default pull is 1000 I believe. I fixed this in my importer tool using this pattern.
https://github.com/esnet/gdg/blob/master/api/dashboards.go#L52
Basically you check if the page size is larger than the payload and keep on checking till you retrieved all the dashboards.
If you have 1200 an easier work around is simply to set the upper bound to 5000 which last I checked was the upper bound of what the Grafana API supported.
Basically
Went another direction. Thanks! https://github.com/grafana/grafana-api-golang-client/pull/124
Hello,
I wrote some code based on this: https://github.com/grafana-tools/sdk/blob/master/cmd/backup-dashboards/main.go
However,
c.SearchDashboards(ctx, "", false)
only pulls 1000 dashboards, and we have over 1200. Curious if I'm missing something, and if there's a way to get them all. I did notice this method is deprecated, and wonder ifc.Search()
will give me better results.Thanks!