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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

web API Range header error

Hi,

 

I'm working on a web API with 2 headers : Authorization and Range. the M code below :

 

API = Json.Document( Web.Contents("https://apixxxxxxxx.com",
        [RelativePath="api/1.0/equipments ",
         Headers = [Authorization="Bearer " & token, Range ="elements=0-5"]])
                          )

 

This web API works fine with POSTMAN, but in power query the code return this error about Range Header :

 

"Expression.Error : 'Range' header must be modified in proprieties or with adequate method.
Parameter name : name
Details :
elements=0-5"

 

has anyone an idea why Power Query doesn't like Range hearder ?

 

thanks

3 REPLIES 3
jherynk
Frequent Visitor

I've outlined the solution in the article below.  Basically, you'll need to build a Logic App to handle the Range parameter.

https://community.powerbi.com/t5/Power-Query/HTTP-Request-Header-quot-Range-quot/m-p/692931/thread-i...

jherynk
Frequent Visitor

v-lili6-msft
Community Support
Community Support

hi, @Anonymous

It seems that no such question has been raised, I looked through a lot of documents, and do not find about,

You could post at the Issues forum or create a support ticket in Power BI Support to get further help.

 

 

Best Regards,
Lin

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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