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
SunilGurram
New Member

Import data from POST method URL

Hi,

Can someone help me ti import the data from web API URL in POST method. API data is in JSON format.

[
{
"Case Code": "123",
"Fund": "ABC",
"Organization": "Life Support for Civilian War Victims",
"Project": "AFG-",
"Project Status": "Project Closed"
}
]

I am trying as follows.

let
url = "http://xxx.xxx.com:8080/vo2/odata/CaseData/BlockedProjectConservativeMeasure",
body = "{""parameter as poolfundcodes"":""123""
}",

Source = Json.Document(Web.Contents(url,[
Headers =[#"Content-Type"="application/json", #"Authorization" = "basic "],
Content = Text.ToBinary(body) , Timeout=#duration(0,2,0,0)
]
))

in
#"Source"

Getting an error

DataSource.Error: Web.Contents failed to get contents

from URL: ....... (500): Internal Server Error.

 

1 ACCEPTED SOLUTION
Hariharan_R
Solution Sage
Solution Sage

Hi 

Refer Chris Webb post - https://blog.crossjoin.co.uk/2014/04/19/web-services-and-post-requests-in-power-query/

He explained that how to call POST request.

 

Thanks

Hari

View solution in original post

3 REPLIES 3
SunilGurram
New Member

Thanks. I am able to import the data now.

Hariharan_R
Solution Sage
Solution Sage

Hi 

Refer Chris Webb post - https://blog.crossjoin.co.uk/2014/04/19/web-services-and-post-requests-in-power-query/

He explained that how to call POST request.

 

Thanks

Hari

Hariharan_R
Solution Sage
Solution Sage

Hi 

Refer Chris Webb post - https://blog.crossjoin.co.uk/2014/04/19/web-services-and-post-requests-in-power-query/

He explained that how to call POST request.

 

Thanks

Hari

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.