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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.