I'm using the alfresco community version 7.4.0 and postman with a basic authentication.
Here the get call :
http://www.mysite.com/alfresco/api/-default-/public/alfresco/versions/1/sites/mysite01/members
here the response:
{ "list": { "pagination": { "count": 6, "hasMoreItems": false, "totalItems": 6, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { "role": "SiteManager", "person": { "aspectNames": [ "myns:myaspect", "sys:referenceable" // i want to see here 'sys:referenceable' if it is possible ], "firstName": "TestUSE01", "capabilities": { "isGuest": false, "isAdmin": false, "isMutable": true }, "displayName": "TestUSE01", "emailNotificationsEnabled": true, "company": {}, "id": "TestUSE01", "enabled": true, "email": "test@gmail.com", "properties": { myns:property1, myns:property2, sys:node-uuid // i want to see here 'sys:node-uuid' if it is possible ... } }, "id": "TestUSE01", "isMemberOfGroup": false } }, .... ] } }
i want to see the property 'sys:node-uuid' on the rest api response if it is possible.
How can i "force" alfresco to show the sys:referenceable aspect ?
Solved! Go to Solution.
The REST API is hidding intentionally internal details, so there is no way to expose the sys:referenceable aspect.
Alternatively, you can use the Search API in this way:
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//*\"" } }'
Where "swsdp" is the id of your site.
Results are including the "id" of the members:
{ "list": { "pagination": { "count": 9, "hasMoreItems": false, "totalItems": 9, "skipCount": 0, "maxItems": 100 }, "context": { "consistency": { "lastTxId": 20 } }, "entries": [ { "entry": { "isFile": true, "createdByUser": { "id": "abeecher", "displayName": "Alice Beecher" }, "modifiedAt": "2015-09-29T10:45:15.729+0000", "nodeType": "cm:content", "content": { "mimeType": "image/jpeg", "mimeTypeName": "JPEG Image", "sizeInBytes": 2347, "encoding": "UTF-8" }, "parentId": "dc103838-645f-43c1-8a2a-bc187e13c343", "createdAt": "2015-09-29T10:45:15.729+0000", "isFolder": false, "search": { "score": 0.0 }, "modifiedByUser": { "id": "abeecher", "displayName": "Alice Beecher" }, "name": "abeecher-avatar.jpg", "location": "nodes", "id": "d65a4795-578e-4780-9f27-96ce43bde700" } }
Forgive me @angelborroy I generally don't ping people directly, but I would like to get answer on this question, Even a simple "you can't"
The REST API is hidding intentionally internal details, so there is no way to expose the sys:referenceable aspect.
Alternatively, you can use the Search API in this way:
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//*\"" } }'
Where "swsdp" is the id of your site.
Results are including the "id" of the members:
{ "list": { "pagination": { "count": 9, "hasMoreItems": false, "totalItems": 9, "skipCount": 0, "maxItems": 100 }, "context": { "consistency": { "lastTxId": 20 } }, "entries": [ { "entry": { "isFile": true, "createdByUser": { "id": "abeecher", "displayName": "Alice Beecher" }, "modifiedAt": "2015-09-29T10:45:15.729+0000", "nodeType": "cm:content", "content": { "mimeType": "image/jpeg", "mimeTypeName": "JPEG Image", "sizeInBytes": 2347, "encoding": "UTF-8" }, "parentId": "dc103838-645f-43c1-8a2a-bc187e13c343", "createdAt": "2015-09-29T10:45:15.729+0000", "isFolder": false, "search": { "score": 0.0 }, "modifiedByUser": { "id": "abeecher", "displayName": "Alice Beecher" }, "name": "abeecher-avatar.jpg", "location": "nodes", "id": "d65a4795-578e-4780-9f27-96ce43bde700" } }
thank you and sorry for the trouble
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.