Search in Groups and People

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner

Search in Groups and People

Jump to solution

Hello,

i would like to know, how can i search in groups an people at once? I need to search in groups and people and sort them alphabetically.

Thanks

1 Solution

Accepted Solutions
Highlighted

Re: Search in Groups and People

Jump to solution

I guess you can't do this in a single REST invocation.

You need to filter groups in the first step...

{
  "query": {
    "query": "SELECT * FROM cm:authorityContainer WHERE cm:authorityName like 'GROUP_ma%'",
    "language": "cmis"
  },
  "include": "properties"
}

... and to filter users later.

{
  "query": {
    "query": "SELECT * FROM cm:person WHERE cm:userName like 'ma%'",
    "language": "cmis"
  },
  "include": "properties"
}

So you can merge the lists in your UI.

Software Engineer in Alfresco Search Team.

View solution in original post

5 Replies
Highlighted

Re: Search in Groups and People

Jump to solution

Is Java API an option?

http://dev.alfresco.com/resource/AlfrescoOne/5.1/PublicAPI/org/alfresco/service/cmr/security/Authori...)

Software Engineer in Alfresco Search Team.
Highlighted
Partner

Re: Search in Groups and People

Jump to solution

I don't think so, we are using only Rest API by own backend writen in .NET Core and frontend writen in ReactJS.

Highlighted

Re: Search in Groups and People

Jump to solution

You can try then something like this:

{
  "query": {
    "query": "select * from cm:authority",
    "language": "cmis"
  }
}
Software Engineer in Alfresco Search Team.
Highlighted
Partner

Re: Search in Groups and People

Jump to solution

This is working and can you please help me with WHERE condition? How can i search all groups and users starting with "ma"? Thank you

Annotation 2020-04-06 152633.png

 

Highlighted

Re: Search in Groups and People

Jump to solution

I guess you can't do this in a single REST invocation.

You need to filter groups in the first step...

{
  "query": {
    "query": "SELECT * FROM cm:authorityContainer WHERE cm:authorityName like 'GROUP_ma%'",
    "language": "cmis"
  },
  "include": "properties"
}

... and to filter users later.

{
  "query": {
    "query": "SELECT * FROM cm:person WHERE cm:userName like 'ma%'",
    "language": "cmis"
  },
  "include": "properties"
}

So you can merge the lists in your UI.

Software Engineer in Alfresco Search Team.

View solution in original post