<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Type of Binary Request Body to be sent from an external system using web api.</title><link>https://community.appian.com/discussions/f/appian-community-edition/31060/type-of-binary-request-body-to-be-sent-from-an-external-system-using-web-api</link><description>Hello all, 
 
 As mentioned in the WEB API documentation, I&amp;#39;m trying to send a pdf in base64 format from an external API/Postman. 
 
 However, when I try to open the pdf in an interface within the Document Viewer tag, it says - Failed to load document</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Type of Binary Request Body to be sent from an external system using web api.</title><link>https://community.appian.com/thread/123983?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2024 13:47:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8c92633a-06f4-48e1-99a7-258584879c1d</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Thanks a lot for that update :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Type of Binary Request Body to be sent from an external system using web api.</title><link>https://community.appian.com/thread/123979?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2024 13:43:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:37187ae4-5135-4c8f-b2ad-62ecf66fd6ab</guid><dc:creator>Ansel Fernandes</dc:creator><description>&lt;p&gt;Hi &amp;nbsp;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your response. I have resolved the issue.&amp;nbsp;&amp;nbsp;However, to answer your questions:&lt;/p&gt;
&lt;p&gt;I was developing a block of code using Python which returned a pdf to Appian.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When doing this, we do not have to actually write the code for document to base64 conversion, just need to pass the file path to the request object. As done below:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/67/pastedimage1704894059411v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;As for Postman, we can test the API by uploading the file from your local storage to Postman under the BINARY sub-section in BODY section.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/67/pastedimage1704894191839v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Hopefully, this information is of use for someone else in the future. Thanks for your response though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Type of Binary Request Body to be sent from an external system using web api.</title><link>https://community.appian.com/thread/123839?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2024 19:57:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d6d87f44-6195-4475-a124-9bed50783da1</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Frist, there is only a single variant of base64 encoding.&lt;/p&gt;
&lt;p&gt;Can you share the configuration and the code of that web API?&lt;/p&gt;
&lt;p&gt;Can you try to use curl to call that API? That might remove some of the uncertainties of Postman.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Type of Binary Request Body to be sent from an external system using web api.</title><link>https://community.appian.com/thread/123838?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2024 19:45:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a3e598cd-a5a9-4e69-9910-8a026f52b4c8</guid><dc:creator>Ansel Fernandes</dc:creator><description>&lt;p&gt;Hello &amp;nbsp;,&lt;br /&gt;&lt;br /&gt;I actually found the issue. I do not have to convert the files into its base64, rather just use the &amp;#39;binary&amp;#39; option under the BODY in Postman, upload the required file and voila, it worked.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The same needs to be done in the code block at the external system&amp;#39;s API endpoint.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Highly appreciate your time and replies though. Cheers!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Type of Binary Request Body to be sent from an external system using web api.</title><link>https://community.appian.com/thread/123837?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2024 19:38:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d389b1c7-c6cb-4be4-80ea-c6d7dd4ad2fe</guid><dc:creator>David Jimenez </dc:creator><description>&lt;p&gt;Seems correct..COuld you also post the definition of the web api?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Type of Binary Request Body to be sent from an external system using web api.</title><link>https://community.appian.com/thread/123836?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2024 19:16:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f101ceae-8e3c-4fe9-909a-8843873cd446</guid><dc:creator>Ansel Fernandes</dc:creator><description>&lt;p&gt;Hi &amp;nbsp;,&lt;br /&gt;Here you go.&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:263px;max-width:543px;" height="263" src="/resized-image/__size/1086x526/__key/communityserver-discussions-components-files/67/pastedimage1704741369196v1.png" width="543" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Type of Binary Request Body to be sent from an external system using web api.</title><link>https://community.appian.com/thread/123835?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2024 19:13:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ade41c3e-836a-49b4-b645-e2e0bd4c2866</guid><dc:creator>David Jimenez </dc:creator><description>&lt;p&gt;Could you post here the http headers please?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>