The easiest thing in the world I want to retrieve the list of members of a site and filter them by role with the official rest api.
I'm using the alfresco community version 7.4.0 and postman with a basic authentication.
Here the get call whitout the where clause (is working):
https://www.mysite.com/alfresco/api/-default-/public/alfresco/versions/1/sites/mysite01/members
here the repsonse:
{
"list": {
"pagination": {
"count": 6,
"hasMoreItems": false,
"totalItems": 6,
"skipCount": 0,
"maxItems": 100
},
"entries": [
{
"entry": {
"role": "SiteManager",
"person": {
"firstName": "test1",
"lastName": "",
"capabilities": {
"isGuest": false,
"isAdmin": false,
"isMutable": true
},
"displayName": "test1",
"emailNotificationsEnabled": true,
"company": {},
"id": "test1username",
"enabled": true,
"email": "test1@gmail.com"
},
"id": "test1username",
"isMemberOfGroup": false
}
},
{
"entry": {
"role": "SiteCollaborator",
"person": {
"firstName": "test2",
"lastName": "",
"capabilities": {
"isGuest": false,
"isAdmin": false,
"isMutable": true
},
"displayName": "test2",
"emailNotificationsEnabled": true,
"company": {},
"id": "test2username",
"enabled": true,
"email": "test2@gmail.com"
},
"id": "test2username",
"isMemberOfGroup": false
}
},
{
"entry": {
"role": "SiteConsumer",
"person": {
"aspectNames": [
...
],
"firstName": "test3",
"lastName": "",
"capabilities": {
"isGuest": false,
"isAdmin": true,
"isMutable": true
},
"displayName": "test3",
"emailNotificationsEnabled": true,
"company": {},
"id": "test3username",
"enabled": true,
"email": "test3@gmail.com",
"properties": {
...
}
},
"id": "test3username",
"isMemberOfGroup": false
}
}
]
}
...
}Here the get call whit the "where" clause, for filter the response only fot he manager, but it doen't filter (is not working):
https://www.mysite.com/alfresco/api/-default-/public/alfresco/versions/1/sites/mysite01/members?where=(role='SiteManager')
but it doesn't filter....WHY ???? and it give me this error...
{
"error": {
"errorKey": "framework.exception.InvalidProperty",
"statusCode": 400,
"briefSummary": "06270120 La proprietà \"role\" con valore \"SiteManager\" non è valida per il confronto EQUALS",
"stackTrace": "Per motivi di sicurezza l'analisi dello stack non viene più visualizzata, ma viene mantenuta la proprietà per le versioni precedenti",
"descriptionURL": "https://api-explorer.alfresco.com"
}
}Am I using the "where" variable in the wrong way ? should I use the "fields" parameter instead ?