I create a grafana organization with m0nhawk's popular Grafana API library for Python with
r = grafana_api.organization.create_organization({"name": organization})
then I switch into that organization and try to list all folders
grafana_api.organizations.switch_organization(organization_id=r[u"orgId"])
grafana_api.folder.get_all_folders()
which yields an empty list.
Then I try to create an initial folder called "General" to fit Grafana's style with
r = grafana_api.folder.create_folder(title="General")
but I get the error:
grafana_api.grafana_api.GrafanaBadInputError: Bad Input: `{'message': 'A folder with that name already exists'}`
If the General
folder already exists, how can I get its folder ID? If it doesn't, how can I create one called "General" without eliciting a GrafanaBadInputError
?