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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
sa34techer
Helper II
Helper II

Adding timeout in WEB.CONTENTS to right place?

Where is the right place to add a Time Out Increase in this connection string?  The Bear Token is a parameter

 

= Json.Document(Web.Contents("https://surveys-api.avius.com/api/v1/survey/133f8356-eb51-5968-b2b6-bf200d505401/changes/117028961/5...",[Timeout=#duration(0, 0, 30, 0)], [Headers=[Authorization=#"Bearer Token", Accept="text/plain"]]))

 

 timeout.png

1 ACCEPTED SOLUTION

I figured it out. I had to remove the bracket in front of Headers. It is working now.

 

= Json.Document(Web.Contents("https://surveys-api.avius.com/api/v1/survey/133f8356-eb51-5968-b2b6-bf200d505401/Changes/0/5000",[Timeout=#duration(0, 1, 0, 0), Headers=[Authorization=#"BearerToken", Accept="text/plain"]]))

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

= Json.Document(Web.Contents("https://surveys-api.avius.com/api/v1/survey/133f8356-eb51-5968-b2b6-bf200d505401/changes/117028961/5...",[Timeout=#duration(0, 0, 30, 0), [Headers=[Authorization=#"Bearer Token", Accept="text/plain"]]]))

Web.Contents - PowerQuery M | Microsoft Learn

Hello Sir, the code you sent gives out a Expression.SyntaxError: Invalid identifier error.   Please look into it and reply with the updated m code.

 

1.png

I figured it out. I had to remove the bracket in front of Headers. It is working now.

 

= Json.Document(Web.Contents("https://surveys-api.avius.com/api/v1/survey/133f8356-eb51-5968-b2b6-bf200d505401/Changes/0/5000",[Timeout=#duration(0, 1, 0, 0), Headers=[Authorization=#"BearerToken", Accept="text/plain"]]))

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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