0

Alfresco 5.1 Enterprise.
I have JS-script:

var def = {
    query: 'ASPECT:"cont:overdue" AND ASPECT:"cont:subject"',
    language: "fts-alfresco"
};

var nodes = search.query(def); 
for each(var node in nodes) {
    print(node.nodeRef);    
}

It outputs list of noderef with given aspects:

NodeRef: workspace://SpacesStore/980d3446-ff84-436c-8430-2f74c99a2267
NodeRef: workspace://SpacesStore/040a2761-7903-4f10-be82-86c162f02f2a
NodeRef: workspace://SpacesStore/986b73f0-eb45-40bf-87cd-b0c8c2d6bcf0

How to get similar result using built-in web-script Alfresco with curl?
Is there some web-script that I can use for this? Any help will be appriciated.

ERemarque
  • 497
  • 3
  • 16
  • Try to list all repo webscripts at /alfresco/s/index. There could exist some endpoint for generic quering. If non exist (Alf 5.1 is old) you must create your own webscript. It's not so complicated, try to look at this tutorial https://ecmarchitect.com/alfresco-developer-series-tutorials/webscripts/tutorial/tutorial.html. – David Dejmal Sep 22 '22 at 08:40
  • @DavidDejmal Thanks you. But I know restful API is not wery well. I'd like to use ready solution. – ERemarque Sep 23 '22 at 07:31
  • Ok, you can try use CMIS. I never test it but I thing, it should work. Look at these sources: https://www.zylk.net/en/web-2-0/blog/-/blogs/how-to-check-alfresco-cmis-queries and https://angelborroy.wordpress.com/2019/06/03/using-cmis-browser-protocol/ . At the end of Angel Borroy's blog is even example for some query. – David Dejmal Sep 23 '22 at 08:30

0 Answers0