Search API and isFavorite

cancel
Showing results for 
Search instead for 
Did you mean: 
MartinTichovsky
Member II

Search API and isFavorite

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
narkuss
Established Member II

Re: Search API and isFavorite

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

MartinTichovsky
Member II

Re: Search API and isFavorite

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

narkuss
Established Member II

Re: Search API and isFavorite

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.