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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
jherynk
Frequent Visitor

HTTP Request Header "Range"

My API integration only returns 25 records by default.  I'd like to return 1000.  I'm attempting to pass the Range parameter through the HTTP Request and cannot figure out the syntax.  

 

[Headers=[Authorization="Basic MDM0M0Mjhj", Range="items=0-1023"]]

 

I recieve this error: "Expression.Error: The 'Range' header must be modified using the appropriate property or method. Parameter name: name Details: Range:items=0-1023"

 

The API integration is expecting this: 

Range:items=0-1023

 

When I pass this in using the Advanced Editor as follows, I also recieve an "Invailid identifier" error.

 

[Headers=[Authorization="Basic MDM0MjU2ZjM0Mjhj", Range:items=0-1023]]

1 ACCEPTED SOLUTION
jherynk
Frequent Visitor

Because the Range parameter is protected or non-typical within a web.contents request, it's best to build the request in "Logic Apps" first.  From Power Bi's Advanced Editor, use Power Query to point the request to the logic app.  The logic app will define the Range parameter.  

 

Power Query Example:

 

let

url="https://westus2.logic..com:443/work..../.../",
body="{
""authHeader"": ""Basic ABCDEFG12345"",
""rangeHeader"": ""items=0-2000""
}",

Source = Json.Document(Web.Contents(url,[
Headers = [#"Content-Type"="application/json"],
Content = Text.ToBinary(body)
]
)),
in
#"Source"

View solution in original post

3 REPLIES 3
jherynk
Frequent Visitor

Because the Range parameter is protected or non-typical within a web.contents request, it's best to build the request in "Logic Apps" first.  From Power Bi's Advanced Editor, use Power Query to point the request to the logic app.  The logic app will define the Range parameter.  

 

Power Query Example:

 

let

url="https://westus2.logic..com:443/work..../.../",
body="{
""authHeader"": ""Basic ABCDEFG12345"",
""rangeHeader"": ""items=0-2000""
}",

Source = Json.Document(Web.Contents(url,[
Headers = [#"Content-Type"="application/json"],
Content = Text.ToBinary(body)
]
)),
in
#"Source"

v-juanli-msft
Community Support
Community Support

Hi @jherynk 

Which API do you use?

facebook API? If so, please refer to a similar thread.

 

What does the range in your code mean?

numbers of pages,posts.....?

 

Best Regards
Maggie

 

@v-juanli-msft I'm using a software called AlertMedia.  It's used in mass notifications like emergencies.  In their documentation the range means number of results.  If you do not pass in a Range header, the system will return 25 results by default. The server also returns a maximum limit of 2,000 results per request.

 

Using Postman, this header returns 100 results.  Note that I've deleted parts of the Auth for security purposes.

 

GET /api/events HTTP/1.1
Host: washcorp.alertmedia.com
Authorization: Basic DJhZDRjYmE0OjhlM
Range: items=0-100
User-Agent: PostmanRuntime/7.13.0
Accept: */*
Cache-Control: no-cache
Postman-Token: 65972c
Host: washcorp.alertmedia.com
accept-encoding: gzip, deflate
Connection: keep-alive
cache-control: no-cache

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Kudoed Authors