I am Alfresco Community Edition user. Exploring REST API but i cannot find APIs to list all files ,List Files in a Site, List All Files in a NODE, List All files for a specific Users etc. Someone answered on stackoverflow that its not not available out of the box.
http://localhost:8080/api-explorer/#!/sites/getSiteContainer
Can anyone help or provide some links for Alfresco REST API with comprehensive details/examples?
Solved! Go to Solution.
I can get list of all files as below;
http://localhost:8080/alfresco/service/slingshot/doclib/doclist/node/site/{siteId}/documentlibrary/
May not be the best approach but looks like a work around for me at the moment.
The children operation on nodes should be ideal to get all files under a specific node. For sites there is no such operation to get all files in one go, except by going through queries. This is due to the fact that there can be any number of hierarchies that cannot be covered by a single navigation operation. The same goes for all files of a user, using either the cm:creator or cmwner properties to determine "belonging to user" (cmwner takes preference, i.e. if cmwner is set, cm:creator is to be ignored).
Thank for a quick reply. I will go through it.
I can get list of all files as below;
http://localhost:8080/alfresco/service/slingshot/doclib/doclist/node/site/{siteId}/documentlibrary/
May not be the best approach but looks like a work around for me at the moment.
I have achieved this using search API and PrefixPath.
Can be helpful for someone else
{ "query": { "query": "PATH:\"/app:company_home/st:sites/cm:product-information/cm:documentLibrary//*\" AND (TYPE:\"cm:content\" OR TYPE:\"cm:folder\")", "language": "lucene" }, "include": ["properties"] }
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.