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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
freidav1984
Frequent Visitor

API request returns blank while trying postman returns data

Hi All!

 

I have the following API request issue in Power Query. The endpoint expects post method. 

let
    url = "https:/link/link/link",
    content = "{
        ""fromDate"" : ""2023-09-01"",
        ""toDate"" : ""2023-11-30"",
        ""accountantStatus"" : ""1"",
        ""dateType"" : ""payment_deadline""
        }",
    headers = [#"x-api-key"="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
    
    response = Web.Contents(url, [Headers = headers, Content=Text.ToBinary(content)])
    
in
    response

 This request returns a json content. But when I am trying to extract the json formatted data, I get a blank list.

 

I also tried in postman the same request, it works, and I am getting the proper dataset. In Postman, the result content-type is application/json;charset utf-8, and the result is a valid json format. Does anyone has an idea what could go wrong here?

 

Other API request with the same method and content data returns data without any problem. But there the content-type is only application/json. Could this content-type difference be a problem? 

 

Any workarounds?

 

I appreciate any help!

 

David

1 REPLY 1
lbendlin
Super User
Super User

try specifying application/json in the Accept  header section

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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