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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
AGo
Post Patron
Post Patron

API REST METHOD POST in PHP

Hello,

 

I've got this API documentation, and I'm trying to return a table in PowerBI, is it possible to embed it in a let statement in Power Query M Language?

 

<?php try{ $client = new SoapClient('http://ws.site.com/soap/vrmsInputServices.php?wsdl');
$credentials = array(
"Language" => "ES", "UserName" =>
"username",
"Password" => "password" );
$criteria = array();
$request = array( "Credentials" => $credentials );
$result = $client->GetCodes($request);
print_r($result); } catch(SoapFault $e){ echo $e; }?>

 

Many thanks

2 REPLIES 2
dax
Community Support
Community Support

Hi @AGo , 

If you want to use POST in REST API, you could refer to web-services-and-post-requests-in-power-query  and postimport for details.

Best Regards,
Zoe Zhi

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

I try to pass the post statement in xml wit this query, I was expecting wrong credential message but it returns Values and Attribute lists for this namespace

http://schemas.xmlsoap.org/wsdl/

 

let
content ="<soapenv:Envelope>
<soapenv:Header/>
<soapenv:Body>
<xsd:GetAccommodationCodesRQ>
<crs:Credentials>
<crs:UserName>?</crs:UserName>
<crs:Password>?</crs:Password>
</crs:Credentials>
</xsd:GetCodesRQ>
</soapenv:Body>
</soapenv:Envelope>",

Source = Xml.Document(Web.Contents("http://ws.site.com/soap/vrmsInputServices.php?wsdl", [Content=Text.ToBinary(content)]))
in
Source

 

Maybe @ImkeF can help

 

Thanks

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.