cancel
Showing results for 
Search instead for 
Did you mean: 

Search API and isFavorite

MartinTichovsky
Champ in-the-making
Champ in-the-making

Hello,

i would like to use include: ["isFavorite"] in /alfresco/api/-default-/public/search/versions/1/search but it not works. How can i get isFavorite property in the response? Thank you

3 REPLIES 3

narkuss
Star Contributor
Star Contributor

Well it seems there is not "isFavorite" option to include in the search REST API endpoint reponse. It may be due to the fact that isFavorite is user-specific.

You should use the favorite REST API endpoint, that seems to be always tied to a specific user, e.g.

http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/people/<user>/favorites

to get a list of all favorited documents, sites, etc... for a user.

Hope that helps

Ah, i see i forgot the word "user defined". Ok and is any possibility to filter favorite files by relativePath?

Looking at the API explorer, I guess you should add "?include=[path] in your favorites url call, and then do some sort of post processing on the results.