I would like to execute an (NXQL) query which would return to me the document based on the file:content/data field. I have tried several different ways of writing the query down but nothing seems to be working for me.
Could you please tell me is it (and how) possible to retrieve a document via REST API or .NET Client based on the download link of the asset(file:content/data)?
I look forward to hearing from you!
The reason I believe why querying based on file:content/data field is not working is because digest value is actually stored instead of link in a data field
Alternative Solution would be querying based on file:content/name. If you have a LINK like
http://host:port/nuxeo/nxfile/default/cfb12863-3ac2-4778-8b4b-06a275a7943b/report:file/2017-Gartner-MQ-CSP.jpg?changeToken=1-0"
Here '2017-Gartner-MQ-CSP.jpg' is the name of a file
So NXQL Query would be->
SELECT * FROM Document WHERE report:file/name = '2017-Gartner-MQ-CSP.jpg'
And REST API would be->
http://host:port/nuxeo/api/v1/search/lang/NXQL/execute?query=SELECT * FROM Document WHERE report:file/name = '2017-Gartner-MQ-CSP.jpg'&properties=*