I have tried the following after enabling the 'remote' object for alfresco (its enabled only for share OOTB) var url = "http://localhost:8080/alfresco/service/api/audit/query/AuditExampleLogin2?verbose=true" var theUrl = "/api/audit/query/AuditExampleLogin2?verbose=true"; var json = remote.call(theUrl); //var connector = remote.connect("http"); //var json = connector.call(url); logger.log(json);
but the returned json is complaining about authentication
{ "status" : { "code" : 401, "name" : "Unauthorized", "description" : "The request requires HTTP authentication." }, "message" : "07200002 Authentication failed for Web Script org\/alfresco\/repository\/audit\/query.get", "exception" : "org.springframework.extensions.webscripts.WebScriptException - 07200002 Authentication failed for Web Script org\/alfresco\/repository\/audit\/query.get",