05-03-2018 01:49 AM
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?
05-03-2018 07:33 AM
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.
05-03-2018 03:52 AM
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).
05-03-2018 07:25 AM
Thank for a quick reply. I will go through it.
05-03-2018 07:33 AM
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.
11-28-2019 03:57 PM
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"] }
Explore our Alfresco products with the links below. Use labels to filter content by product module.