modifying the data source path in a custom connector
I would like to raise an enhancement request for the extension data source path in a custom connector to be able to be modified by the connector, rather than be hard-coded, based on the non-optional parameters.
We have a corporate REST API which we would like reported through Power BI. This is a typical API which allows access to datasets via urls like:
https://api.company.com/customers?filter=country eq 'AUSTRALIA'
https://api.company.com/customers?filter=country eq 'USA'&top=100
https://api.company.com/customers?filter=country eq 'UK'
https://api.company.com/customers?filter=country eq 'CHINA'
We require this API to be accessible to Power BI. The built-in web connector is not suitable as it would require too much manipulation of the JSON (e.g. changing types) that our users
are unable to do. Therefore we have created a custom connector to automate the manipulation of the JSON, changing types etc.
This custom connector takes a single url parameter (type text, ascribed type is Uri.Type).
The issue is that when deployed to Power BI Service, credentials for each query in the dataset/report must be configured in the data source screen. We are using the Import Mode, so are limited
to scheduled refreshes of the data (max 8 times per day). This also means that we cannot use the user's credentials. A service account is used to configure credentials. However, at the moment, each data source in the report is identified using a combination of the connector name AND the full Uri parameter. This means that all 4 urls above are identified as 'different' and hence we are forced to configure the credentials/data source for each of them.
Given that we are using a service account in the data source, we would like all queries / urls in our API scheme to use the same single set of credentials (or maybe one set of credentials for
each path in the API), instead of having to configure a data source for every unique url (which often only differ from each other by the query string).
We will have 100s of reports and maybe 1000s of unique queries published to Power BI Service, and having to create a data source for every one of these is a potential show-stopper for us.
I believe a simple resolution would be to allow custom connectors to control the data source path so that multiple invocations of the connector with different parameters could resolve to the same data source path, and therefore use the same credentials where desired.
(Note: Setting the 'Label' attribute only appears to change the the visual label displayed - the actual data source path is not changed).