<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Alfresco REST API the &amp;quot;where&amp;quot; clause doesn't seem to work in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-rest-api-the-quot-where-quot-clause-doesn-t-seem-to/m-p/122978#M33669</link>
    <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;I'm using the alfresco community version 7.4.0 and postman with a basic authentication.&lt;/P&gt;&lt;P&gt;Here the get call whitout the where clause (is working):&lt;/P&gt;&lt;PRE&gt;https://www.mysite.com/alfresco/api/-default-/public/alfresco/versions/1/sites/mysite01/members&lt;/PRE&gt;&lt;P&gt;here the repsonse:&lt;/P&gt;&lt;PRE&gt;{
    "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
                }
            }
        ]
    }&lt;BR /&gt;    ...
}&lt;/PRE&gt;&lt;P&gt;Here the get call whit the "where" clause, for filter the response only fot he manager, but it doen't filter (is&amp;nbsp; not working):&lt;/P&gt;&lt;PRE&gt;https://www.mysite.com/alfresco/api/-default-/public/alfresco/versions/1/sites/mysite01/members?where=(role='SiteManager')&lt;/PRE&gt;&lt;P&gt;but it doesn't filter....WHY ???? and it give me this error...&lt;/P&gt;&lt;PRE&gt;{
    "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"
    }
}&lt;/PRE&gt;&lt;P&gt;Am I using the "where" variable in the wrong way ? should I use the "fields" parameter instead ?&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2023 09:11:19 GMT</pubDate>
    <dc:creator>AlfrescoZZZ</dc:creator>
    <dc:date>2023-07-27T09:11:19Z</dc:date>
    <item>
      <title>Alfresco REST API the "where" clause doesn't seem to work</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-rest-api-the-quot-where-quot-clause-doesn-t-seem-to/m-p/122978#M33669</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;I'm using the alfresco community version 7.4.0 and postman with a basic authentication.&lt;/P&gt;&lt;P&gt;Here the get call whitout the where clause (is working):&lt;/P&gt;&lt;PRE&gt;https://www.mysite.com/alfresco/api/-default-/public/alfresco/versions/1/sites/mysite01/members&lt;/PRE&gt;&lt;P&gt;here the repsonse:&lt;/P&gt;&lt;PRE&gt;{
    "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
                }
            }
        ]
    }&lt;BR /&gt;    ...
}&lt;/PRE&gt;&lt;P&gt;Here the get call whit the "where" clause, for filter the response only fot he manager, but it doen't filter (is&amp;nbsp; not working):&lt;/P&gt;&lt;PRE&gt;https://www.mysite.com/alfresco/api/-default-/public/alfresco/versions/1/sites/mysite01/members?where=(role='SiteManager')&lt;/PRE&gt;&lt;P&gt;but it doesn't filter....WHY ???? and it give me this error...&lt;/P&gt;&lt;PRE&gt;{
    "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"
    }
}&lt;/PRE&gt;&lt;P&gt;Am I using the "where" variable in the wrong way ? should I use the "fields" parameter instead ?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 09:11:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-rest-api-the-quot-where-quot-clause-doesn-t-seem-to/m-p/122978#M33669</guid>
      <dc:creator>AlfrescoZZZ</dc:creator>
      <dc:date>2023-07-27T09:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco REST API the "where" clause doesn't seem to work</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-rest-api-the-quot-where-quot-clause-doesn-t-seem-to/m-p/122979#M33670</link>
      <description>&lt;P&gt;Forgive me &lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/5487"&gt;@angelborroy&lt;/A&gt;&amp;nbsp;I generally don't ping people directly, but I would like to get answer on this question.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 07:28:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-rest-api-the-quot-where-quot-clause-doesn-t-seem-to/m-p/122979#M33670</guid>
      <dc:creator>AlfrescoZZZ</dc:creator>
      <dc:date>2023-08-30T07:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco REST API the "where" clause doesn't seem to work</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-rest-api-the-quot-where-quot-clause-doesn-t-seem-to/m-p/122980#M33671</link>
      <description>&lt;P&gt;The only parameter accepted for the WHERE clause is "isMemberOfGroup":&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-community-repo/blob/master/remote-api/src/main/java/org/alfresco/rest/api/impl/SitesImpl.java#L287" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/alfresco-community-repo/blob/master/remote-api/src/main/java/org/alfresco/rest/api/impl/SitesImpl.java#L287&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can apply the same workaround described in the other thread. Use the Search API instead:&lt;/P&gt;
&lt;PRE&gt;curl --location 'http://localhost:8080/alfresco/api/-default-/public/search/versions/1/search' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--data '{
  "query": {
    "query": "PATH:\"/sys:system/sys:authorities/cm:GROUP_site_swsdp_SiteManager//*\""
  }
}'&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Aug 2023 09:21:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-rest-api-the-quot-where-quot-clause-doesn-t-seem-to/m-p/122980#M33671</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2023-08-30T09:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco REST API the "where" clause doesn't seem to work</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-rest-api-the-quot-where-quot-clause-doesn-t-seem-to/m-p/122981#M33672</link>
      <description>&lt;P&gt;thank you and sorry for the trouble&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 12:44:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-rest-api-the-quot-where-quot-clause-doesn-t-seem-to/m-p/122981#M33672</guid>
      <dc:creator>AlfrescoZZZ</dc:creator>
      <dc:date>2023-08-30T12:44:10Z</dc:date>
    </item>
  </channel>
</rss>

