Download or open document in browser using REST service

I'm having trouble downloading or openning in the browser a document from Content Server using the REST service "/api/v1/nodes/{{doc_id}}/content".From Postman it works well and you can even see a preview of the document (image, text, pdf).

I know Postman shows code examples in different languages, but I have not been able to download a document using javascript/jquery.

Also, I saw once this variation of same service: "/api/v1/nodes/{{doc_id}}/content?action=open&token={{xxxxxxxxxxxx}}" to show the document in a browser window. But I have no idea of how to obtain the token parameter.

Any help in any of both cases would be great !

Comments

  • the token param could be the authentication token, usually passed in the request, there are some simple tutorials in https://developer.opentext.com