Forum Discussion
Connect to REST API (Python-MongoDB)
- 5 years ago
Hi Anonymous ,
Import using Power BI Query Mode: Select your DSN (after connecting using ODBC connector)and click Advanced Option to enter custom SQL Query to Import your REST API data. You can use ODBC DSN Data sources Preview tool to generate SQL Query. For example you can enter query like below. If you are not sure use Query builder (Found on Driver Preview Window)
SELECT * FROM $ WITH(src='https://my-api-url')
For details,pls check below reference:
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
Anonymous , Copy this JSON and check with the online JSON formatter. is the format correct ?
amitchandak , the format is correct, the online converter just beautfied it.
Even if this format were to be wrong, I won't be able to change it as the API is taking data directly from MongoDB (which stores data in .json format)
Is there any workaround for this problem? Is/are there any other way(s) to solve this?
- v-kelly-msft5 years agoCommunity Support
Hi Anonymous ,
Import using Power BI Query Mode: Select your DSN (after connecting using ODBC connector)and click Advanced Option to enter custom SQL Query to Import your REST API data. You can use ODBC DSN Data sources Preview tool to generate SQL Query. For example you can enter query like below. If you are not sure use Query builder (Found on Driver Preview Window)
SELECT * FROM $ WITH(src='https://my-api-url')
For details,pls check below reference:
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
- Anonymous4 years agoNot applicable
Hi v-kelly-msft. It worked. Thank you so much. 🙂
- v-kelly-msft4 years agoCommunity Support
Hi Anonymous ,
Glad to help.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!