04-17-2020 06:59 AM
Hello,
i would like to know, how can i get a list of favorites files from specific folder, for example i have folder in Sites/Home/documentLibrary/Documents and i need to get only favorites files via API aka
/alfresco/api/-default-/public/alfresco/versions/1/node/{nodeId}/childrenCan i specify where query or use different API? Thanks
04-17-2020 08:05 AM
This is working for me:
curl --location --request GET \
'http://127.0.0.1:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children?skipCount=0&maxItems=100&include=isFavorite' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic YWRtaW46YWRtaW4='
What Alfresco version are you using?
04-17-2020 09:29 AM
Ok sorry, i thought ONLY favorite files. I'm using ACS 6.2
04-17-2020 11:31 AM
Add "&where=(isFile%3Dtrue)" the the URL I gave you before and it will return files with the "isFavorite" property.
04-18-2020 03:57 PM
Sorry, my english is maybe not good, but my goal is not to get property, but to get ONLY favorite files. For example, i need to show last 25 favorite files sorted by createdAt in folder sites/Test/documentLibrary/Documents and that what you are describing will get all files but with property isFavorite and what i need to do if i need to show last 25 favorite files? I have to paging and count isFavorite. And if the user would like see next page, next 25 favorite files, what i need to do? The same process.
Therefore i'm looking for possibility how to get ONLY favorite files via API children or Search API.
Thanks