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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Not able to connect REST API link in Linux while pushing data

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.

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

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.

Anonymous
Not applicable

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!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.