Fetch the size uploaded by custom property 'username' of a custom aspect .

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2021 02:35 AM
I have created a custom aspect that has a property userName.Now I want to fetch the size of files based on this custom property. Is there any API that gives the required Results?
If there isn't any API then How to create one. Can anyone help with this?
- Labels:
-
Alfresco Content Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2021 05:07 AM
You may try using the REST API.
This one is getting the information for a simple "budget" query, but you can adapt it to your requirements.
curl --location --request POST 'http://localhost:8080/alfresco/api/-default-/public/search/versions/1/search' \ --header 'Authorization: Basic YWRtaW46YWRtaW4=' \ --header 'Content-Type: application/json' \ --data-raw '{ "query": { "query": "budget" }, "stats": [ { "field": "content.size", "sum": true } ] }'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2021 05:38 AM
In place of budget, I need to query based on cm:creator of cm:auditable aspect. Can you show me an example of how to use it in a query?
