I know this question has been asked before and was even a subject of a blog article, but answers to those were focused on curl like URLs and not so much on input/output variables. So:
With Blob.Get one can get either the main-document or a document attached to a main-document depending on the parameters being passed. General layout would be (in PHP, but more or less generic):
->newRequest("Blob.Get")
->set('input', 'doc:'' . $idoc)
->set('input', 'docs:" . $idocs)
->set('param', 'xpath', $xpath)
docs and xpath are optional
Depending on what you provide one can get returned:
- error 666 (not documented, but can be anything as it is the only error(number) which is implemented)
- some weird zip-file with the name+extension of the main document containing a structure of xml files
- the main document
So far I failed to get an attachment using the rest API. As the 'data' property contains the full URL it can be done using curl or the likes. But how to commence using the REST API itself (call returning a blob as can be expected of blob.get)?
docs:utl from data?
xpath:files:content[no-of-attachment]
or ... ?
Is this documented with examples somewhere?