04-06-2020 07:34 AM
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
04-06-2020 10:15 AM
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.
04-06-2020 07:56 AM
Is Java API an option?
04-06-2020 08:29 AM
I don't think so, we are using only Rest API by own backend writen in .NET Core and frontend writen in ReactJS.
04-06-2020 08:40 AM
You can try then something like this:
{ "query": { "query": "select * from cm:authority", "language": "cmis" } }
04-06-2020 09:27 AM
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
04-06-2020 10:15 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.