When I use grafana /api/dashboards/uid/xyz123 API, I get all definitions of dashboard xyz123, except the datasources’ ids. It returns dashboard json with “datasource”: null, If I export it via GUI (share->export) it does have datasources’ ids. Pls advise.
Asked
Active
Viewed 908 times
1
-
If an API provided by any tool is not working as expected, you should report this to the maintainers of the API. Unless you share code, this is off-topic on StackOverflow – Nico Haase Nov 22 '22 at 09:28
-
1Are you sure you are comparing the same panels within your dashboard? For me, datasource is always `null` if the default datasource is used. Only if a non-default datasource is used, its name is written in the JSON. And it is like that in the GUI, in the export, and in the API response. – dnnshssm Nov 22 '22 at 09:43