You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The folders.get_all_folders endpoint provides the parent_uid, if set, in data. This puts it in the body of the resulting API request. This needs to be a query parameter, however.
Create a Folder in grafana. Create a subfolder folder within it. Note that nested folders needs to be enabled on the Grafana instance
Run client.folders.get_all_folders(parent_uid=<uid of created parent>)
You'll get the contents of the root folder
Expected behavior
Folders contained within the provided parent_uid should be returned.
Versions
Grafana: v10.4.1 (d3ce857c0e)
grafana-client: git main head
Authentication: Token
Additional context
I've quickly tested that the problem is resolved if I change data=data to params=data in the __request_runner call to s.request() in client.py. Obviously, this is not a viable solution.
The infrastructure needs to be modified to allow params to be passed through to the final request call, the same way data presently is.
The text was updated successfully, but these errors were encountered:
chintal
added a commit
to chintal/grafana-client
that referenced
this issue
Apr 12, 2024
thank you so much for discovering and fixing that flaw already. It clearly demonstrates yet another time that grafana-client needs an integration test suite.
Describe the bug
The
folders.get_all_folders
endpoint provides the parent_uid, if set, indata
. This puts it in the body of the resulting API request. This needs to be a query parameter, however.https://grafana.com/docs/grafana/latest/developers/http_api/folder/#get-all-folders
To Reproduce
Steps to reproduce the behavior:
client.folders.get_all_folders(parent_uid=<uid of created parent>)
Expected behavior
Folders contained within the provided parent_uid should be returned.
Versions
grafana-client
: git main headAdditional context
I've quickly tested that the problem is resolved if I change
data=data
toparams=data
in the__request_runner
call tos.request()
in client.py. Obviously, this is not a viable solution.The infrastructure needs to be modified to allow
params
to be passed through to the final request call, the same waydata
presently is.The text was updated successfully, but these errors were encountered: