AnsweredAssumed Answered

Trouble accessing share resources via RESTful api and ticket

Question asked by chuyser on Jul 4, 2013
Latest reply on Jul 5, 2013 by castgroupteam
I would like to use the RESTful API to access a list of documents accessible by a particular user. I can log in to alfredo and get the associated ticket, and calls such as http://server_ip:port/alfresco/service/api/people/username/sites?alf_ticket=TICKET_ticketnum succeed in getting the list of sites for a user. But calls against the share fail. For instance: http://server_ip:port/share/service/components/documentlibrary/data/doclist/all/node/alfresco/company/home/User%20Homes/username?alf_ticket=TICKET_ticketnum

results in an internal server error with the stack trace giving the following error message: "exception": "org.springframework.extensions.webscripts.WebScriptException - 06040013 Failed to execute script 'classpath*:alfresco/site-webscripts/org/alfresco/components/documentlibrary/data/surf-doclist.get.js': 06040012 06040013 Failed to run action evaluator: 06040012 User ID must exist and cannot be guest."

Similarly, http://server_ip:port/share/service/components/documentlibrary/data/doclist/all/node/workspace/SpacesStore/sitenodenumber gives a 401 response without the ticket, and the same server error as above when the ticket is passed with the URL.

I am using Postman as my testbed. I have tried setting the Authentication header in the Basic Header portion of Postman to resolve this – and tried the URL with and without the ticket – but I have had no luck (without the ticket, I simply get a 401 Unauthorized status from the server). I have also tried the URL parameter as "ticket" instead of "alf_ticket". Just for grins, I also tried these calls via curl, with the same results.

I am running against Alfredo community edition 4.0.0, build 7, schema 5025.

Any help would be greatly appreciated!

Thanks,
Cindy Huyser

Outcomes