<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error when using the REST Api trying to convert a document in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-the-rest-api-trying-to-convert-a-document/m-p/325467#M12468</link>
    <description>&lt;P&gt;Ok, the correct answer is the following, you have to :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;make a POST request (since its an automation operation)&lt;/LI&gt;
&lt;LI&gt;add the application/json+nxrequest header as Content-Type&lt;/LI&gt;
&lt;LI&gt;add some empty param in the request body like {"params":{}}&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;To be sure, here is a sample request on demo.nuxeo.org with curl that works&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;curl -X POST -H "Content-Type: application/json+nxrequest"   -u Administrator:Administrator -d '{"params":{}}'   http://demo.nuxeo.com/nuxeo/api/v1/path/default-domain/workspaces/IT%20Department/Expertise%20Center/Alice\'s%20Adventures%20in%20Wo/@blob/file:content/@op/Blob.ToPDF &amp;gt; test.pdf
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 28 Mar 2014 15:30:55 GMT</pubDate>
    <dc:creator>Damien_Metzler</dc:creator>
    <dc:date>2014-03-28T15:30:55Z</dc:date>
    <item>
      <title>Error when using the REST Api trying to convert a document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-the-rest-api-trying-to-convert-a-document/m-p/325464#M12465</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;the example for adapters in the REST Api section of the documentation does not work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;/nuxeo/api/v1/id/{docId}/@blob/file:content/@op/Blob.ToPDF
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the first part /nuxeo/api/v1/id/{docId}/@blob/file:content/ does provide the binary file, but adding the convert operation leads to a &lt;A href="http://pastebin.com/ieJv4Uz9"&gt;webengine error&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2014 06:59:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-the-rest-api-trying-to-convert-a-document/m-p/325464#M12465</guid>
      <dc:creator>pibou_Bouvret</dc:creator>
      <dc:date>2014-03-28T06:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error when using the REST Api trying to convert a document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-the-rest-api-trying-to-convert-a-document/m-p/325465#M12466</link>
      <description>&lt;P&gt;Did you add the application/json+nxrequest header in your request ?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2014 10:34:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-the-rest-api-trying-to-convert-a-document/m-p/325465#M12466</guid>
      <dc:creator>Damien_Metzler</dc:creator>
      <dc:date>2014-03-28T10:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error when using the REST Api trying to convert a document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-the-rest-api-trying-to-convert-a-document/m-p/325466#M12467</link>
      <description>&lt;P&gt;Nope,&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2014 11:09:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-the-rest-api-trying-to-convert-a-document/m-p/325466#M12467</guid>
      <dc:creator>pibou_Bouvret</dc:creator>
      <dc:date>2014-03-28T11:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error when using the REST Api trying to convert a document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-the-rest-api-trying-to-convert-a-document/m-p/325467#M12468</link>
      <description>&lt;P&gt;Ok, the correct answer is the following, you have to :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;make a POST request (since its an automation operation)&lt;/LI&gt;
&lt;LI&gt;add the application/json+nxrequest header as Content-Type&lt;/LI&gt;
&lt;LI&gt;add some empty param in the request body like {"params":{}}&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;To be sure, here is a sample request on demo.nuxeo.org with curl that works&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;curl -X POST -H "Content-Type: application/json+nxrequest"   -u Administrator:Administrator -d '{"params":{}}'   http://demo.nuxeo.com/nuxeo/api/v1/path/default-domain/workspaces/IT%20Department/Expertise%20Center/Alice\'s%20Adventures%20in%20Wo/@blob/file:content/@op/Blob.ToPDF &amp;gt; test.pdf
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Mar 2014 15:30:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-the-rest-api-trying-to-convert-a-document/m-p/325467#M12468</guid>
      <dc:creator>Damien_Metzler</dc:creator>
      <dc:date>2014-03-28T15:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error when using the REST Api trying to convert a document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-the-rest-api-trying-to-convert-a-document/m-p/325468#M12469</link>
      <description>&lt;P&gt;the request body made it&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2014 17:02:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/error-when-using-the-rest-api-trying-to-convert-a-document/m-p/325468#M12469</guid>
      <dc:creator>pibou_Bouvret</dc:creator>
      <dc:date>2014-03-28T17:02:00Z</dc:date>
    </item>
  </channel>
</rss>

