07-27-2023 06:47 AM
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 ?
08-30-2023 05:00 AM
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"
}
}
08-30-2023 03:26 AM
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"
08-30-2023 05:00 AM
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"
}
}
08-30-2023 08:41 AM
thank you and sorry for the trouble
Explore our Alfresco products with the links below. Use labels to filter content by product module.