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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Jeanxyz
Power Participant
Power Participant

Does anyone knows how to run a http call in a notebook

I am reading a MS documentation, it says one can refresh sql endpoint meta data via a http call:

POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/sqlEndpoints/{sqlEndpointId}/refreshMet...

https://learn.microsoft.com/en-us/rest/api/fabric/sqlendpoint/items/refresh-sql-endpoint-metadata?ta...

How can I run a http call in notebook? Is it complicated?

 

1 ACCEPTED SOLUTION
OnurOz
Resolver I
Resolver I

Hi Jeanxyz,

 

You can run HTTP calls directly from a notebook in Microsoft Fabric using Python, and it's straightforward if you use the popular requests library. This approach works in both Spark and non-Spark Python environments.

 

import requests

url = "https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/sqlEndpoints/{sqlEndpointId}/refreshMetadata"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
}

response = requests.post(url, headers=headers)
print(response.status_code)
print(response.text)

 

Replace {workspaceId}{sqlEndpointId}, and YOUR_ACCESS_TOKEN with your actual values. You must provide a valid Azure AD access token, this usually involves authentication, which can be handled via Azure Identity, MSAL, or other SDKs that you may already use for automation.

 

Hope that helps

Onur


😊If this post helped you, feel free to give it some Kudos! 👍

And if it answered your question, please mark it as the accepted solution.


View solution in original post

3 REPLIES 3
v-karpurapud
Community Support
Community Support

Hi @Jeanxyz 

We would like to confirm whether the issue has been resolved. If it is still outstanding, please share any additional information so we can assist you further.

Thank you.

v-karpurapud
Community Support
Community Support

Hi @Jeanxyz 

Thanks for reaching out to the Microsoft fabric community forum. 

 

I would also take a moment to thank @OnurOz   , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

I hope the shared details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you 

 

 

Best Regards, 
Community Support Team.

OnurOz
Resolver I
Resolver I

Hi Jeanxyz,

 

You can run HTTP calls directly from a notebook in Microsoft Fabric using Python, and it's straightforward if you use the popular requests library. This approach works in both Spark and non-Spark Python environments.

 

import requests

url = "https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/sqlEndpoints/{sqlEndpointId}/refreshMetadata"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
}

response = requests.post(url, headers=headers)
print(response.status_code)
print(response.text)

 

Replace {workspaceId}{sqlEndpointId}, and YOUR_ACCESS_TOKEN with your actual values. You must provide a valid Azure AD access token, this usually involves authentication, which can be handled via Azure Identity, MSAL, or other SDKs that you may already use for automation.

 

Hope that helps

Onur


😊If this post helped you, feel free to give it some Kudos! 👍

And if it answered your question, please mark it as the accepted solution.


Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric 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.