Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I am trying to add timeout ([Timeout=#duration(0,2,0,0)]) to the API to get data from a web source but somehow i am not able to do it succesfully.
Please suggest how to add [Timeout=#duration(0,0,30,0)] in the below code which can run without error.
Thanks
Solved! Go to Solution.
Hi @jitpbi,
As official document mention, the 'timeout' property should be an optional parameter that host in the same level as 'relativepath' and 'header'.
Web.Contents 
I think you can try to add a comma after the 'query' and append it with the 'timeout' property.
let
    rooturl = "https:/xxxx.xxxx.com/",
    authKey = "xxxxx",
    Source =
        Web.Contents(
            rooturl,
            [
                Headers = [
                    #"Authorization" = authKey,
                    #"Content-Type" = "application/json"
                ],
                RelativePath = "xxx/xxx/xxx",
                Query = [
                    startdate = xxxx,
                    enddate = xxxx
                ],
                Timeout = #duration(0, 0, 35, 0)
            ]
        )
in
    SourceRegards,
Xiaoxin Sheng
 
					
				
		
Hi @jitpbi
For my SQL database below is the M
Source = Sql.Databases("Server123", [CommandTimeout=#duration(0, 0, 35, 0)])code which is used.
Thanks @Anonymous for the comment. I can add the timeout in single line URL and it works. Actually long single url doesn't work in refresh so i need to break the url in small parts, like in my first post, where i am not able to add timeout properly.
thanks
Hi @jitpbi,
As official document mention, the 'timeout' property should be an optional parameter that host in the same level as 'relativepath' and 'header'.
Web.Contents 
I think you can try to add a comma after the 'query' and append it with the 'timeout' property.
let
    rooturl = "https:/xxxx.xxxx.com/",
    authKey = "xxxxx",
    Source =
        Web.Contents(
            rooturl,
            [
                Headers = [
                    #"Authorization" = authKey,
                    #"Content-Type" = "application/json"
                ],
                RelativePath = "xxx/xxx/xxx",
                Query = [
                    startdate = xxxx,
                    enddate = xxxx
                ],
                Timeout = #duration(0, 0, 35, 0)
            ]
        )
in
    SourceRegards,
Xiaoxin Sheng
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 88 | |
| 49 | |
| 37 | |
| 31 | |
| 30 |