Get basic datasource info from API by non-admin user

Let’s say I have a set of credentials for a Grafana user with Editor permissions on a given organization. I’m looking for a programmatic way to obtain basic details about that user’s default datasource - i.e. the default datasource for their current organization. By “basic details” I mean specifically the datasource ID and the database name - these are the two bits of information that I need to issue datasource queries for that datasource, at least for Influx.

I feel like this should be possible, since those details are already available to the user, for example when they create a new dashboard panel. Indeed, the datasource details are contained within the window.grafanaBootData settings provided when http://grafanahost/dashboard/new is loaded.

So as a workaround I could load entire “new dashboard” page and parse the text to pull these details out, but ideally I’d like to do this via an API call. Yet, calling the data source API endpoint with Editor credentials simply returns 403. That partly makes sense, since some of the data provided by that endpoint (e.g. datasource credentials) should only be accessible to admin users, but it would be nice to also be able to get basic details as an Editor or Viewer.

Any ideas as to how I can do what I’m trying to do?

Just wanted to bump this to see if there are any fresh ideas?

Currently we’re essentially doing a web scrape in order to allow a non-admin user to get their default datasource details (ID and database name). If there’s a way to do this via the API, that would be preferable.

I’m facing the same problem (unable to use datasource apis with non-admin users). I would really like grafana community to introduce this functionality (if its really not available). Without having to differentiate between admin and non-admin user levels, it really limits the usage of grafana in my case as non-admin users won’t be able to see the panels which are using grafana datasource apis.
Or I would really want to know if there is an alternative to achieve this?