Skip to main content
Microsoft Dynamics NAV forum

Upload File by consuming REST web service

editSubscribe (0) ShareShare
Posted on by 940

Hi Everyone,

Can anyone share good example for upload file / send file by consuming external REST Web service ? 

My end point would be something like bellow

I have to pass three parameters, API Key, Workflowid and file. 

I wrote bellow code,

userFile := 'D:\Temp\Helvetia.pdf';

RequestURL := '';

Req := '{"api_key":"5445989G98398fs3t5","workflow_id":"939925","userfile":"'+userFile+'"}';,RequestURL,FALSE,'','');
Request.send(Req );
IF Request.status = 200 THEN

But I am getting error. But I try using SOAPUI, it worked. 

Can anyone help suggest good method to pass file by consuming external REST API


Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,066 Super User

Martin Dráb Profile Picture

Martin Dráb 222,585 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans