Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Able to push data to a streaming dataset through Python script from my local. But, not able to connect to API URL with the same script from Linux. Can you please help me on this.
Hi, @Anonymous ;
The main reason for the failure is probably a port problem. Power BI verifies only the word fields and information in the request.
https://realpython.com/api-integration-in-python/
https://docs.microsoft.com/en-us/power-bi/admin/power-bi-allow-list-urls
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks much @v-yalanwu-msft for the response!
https://realpython.com/api-integration-in-python/
https://docs.microsoft.com/en-us/power-bi/admin/power-bi-allow-list-urls
I have gone through above two links those you have provided. I tried to post some sample data to the streaming dataset. Below is the script I have used,
import requests
api_url = "https://api.powerbi.com/my dataset url"
todo = {"userId": 1, "title": "Buy milk", "completed": False}
response = requests.post(api_url, json=todo)
print(response.json())
{'userId': 1, 'title': 'Buy milk', 'completed': False, 'id': 201}
print(response.status_code)
This is working fine and I'm able to post data from my local machine. But, when I execute the same script in my Linux I'm getting below error.
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.powerbi.com', port=443): Max retries exceeded with url: my dataset url (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f7cf678f640>: Failed to establish a new connection: [Errno 110] Connection timed out'))
Do I need to add this api url in AllowList? If yes, how can I add it. Can you please share any link or process to add it. Otherwise, do I need to ask my Linux/Azure admin to add this api link to AllowList?
Thanks!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!