- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2014 02:59 AM
Hi
the example for adapters in the REST Api section of the documentation does not work
/nuxeo/api/v1/id/{docId}/@blob/file:content/@op/Blob.ToPDF
the first part /nuxeo/api/v1/id/{docId}/@blob/file:content/ does provide the binary file, but adding the convert operation leads to a webengine error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2014 11:30 AM
Ok, the correct answer is the following, you have to :
- make a POST request (since its an automation operation)
- add the application/json+nxrequest header as Content-Type
- add some empty param in the request body like {"params":{}}
To be sure, here is a sample request on demo.nuxeo.org with curl that works
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 > test.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2014 06:34 AM
Did you add the application/json+nxrequest header in your request ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2014 07:09 AM
Nope,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2014 11:30 AM
Ok, the correct answer is the following, you have to :
- make a POST request (since its an automation operation)
- add the application/json+nxrequest header as Content-Type
- add some empty param in the request body like {"params":{}}
To be sure, here is a sample request on demo.nuxeo.org with curl that works
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 > test.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2014 01:02 PM
the request body made it
