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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
sa34techer
Helper I
Helper I

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Solution Authors