DataSourceInstanceSettings.URL is not set

I have a custom datasource backend plugin. In the backend’s QueryData implementation, I want to get the URL for the datasource. I expected this to be available on the DataSourceInstanceSettings that comes in on the request but that field has no value.

Ultimately, I am trying to get my query to use a proxy route I have configured on that backend to fetch its data. The route was initially set up to provide some supplementary data to the query config editor in the frontend (populate some combo boxes) and is set up to manage the authorization tokens automatically. Since my query is hitting the same API for its data, I would like to share that token management so I don’t have code my own. The simplest solution seemed to be to just hit my proxy URL from my query method instead of the API but I don’t want to hard-code the proxy URL. I figured since this code lives in the backend, it ought to be able to know what its own URL is but that information doesn’t seem to be coming through on the instance settings.

Any suggestions would be appreciated.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.