Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
PBIAniket
New Member

Connecting to internal API in Live or Direct Query mode

Hello All,

 

I have a internal REST API which is connects to On Prem oracle database.

The connection in Power BI for this API through Web Connector happens in Import Mode.

 

I am looking for solution or workaround which will enables me to connect to this API in direct query or live connection, because we have a requirement where user will select the values from Slicer/Filter from the Report. These selected values should be pass in the API parameters and API should make a call and bring the data based on selected parameter values. 

 

Request you all to please share your expert suggestions on how can I acheive Live or Direct Query connection with API.

Can it be done with the help of M-Code, since the conectors like Web, OData Feed or ODBC only supporting import mode of connectivity.

Thanks!

 

 

1 ACCEPTED SOLUTION
v-kongfanf-msft
Community Support
Community Support

Hi @PBIAniket ,

 

In Power BI, the connectors Web Connector, OData Feed, and ODBC are usually in import mode by default and do not support direct queries or live connections.

However, you can try to accomplish this by doing the following:

1.Using parameterized queries:
In import mode, you can use a parameterized query to pass the values selected by the user in the Slicer/Filter, and then use those parameters in the API call. While this is not a live connection, it can be updated by refreshing the data.

vkongfanfmsft_0-1704880602746.png

 

2.Configuring Gateways:
By setting up a gateway, you can refresh data in Power BI Service without public direct access to the internal API.

Refer to below document:

Add or remove a gateway data source - Power BI | Microsoft Learn


Best Regards,

Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-kongfanf-msft
Community Support
Community Support

Hi @PBIAniket ,

 

In Power BI, the connectors Web Connector, OData Feed, and ODBC are usually in import mode by default and do not support direct queries or live connections.

However, you can try to accomplish this by doing the following:

1.Using parameterized queries:
In import mode, you can use a parameterized query to pass the values selected by the user in the Slicer/Filter, and then use those parameters in the API call. While this is not a live connection, it can be updated by refreshing the data.

vkongfanfmsft_0-1704880602746.png

 

2.Configuring Gateways:
By setting up a gateway, you can refresh data in Power BI Service without public direct access to the internal API.

Refer to below document:

Add or remove a gateway data source - Power BI | Microsoft Learn


Best Regards,

Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors