10-18-2020 05:24 PM
Hi,
How to list files metadata (File name + Creation & Modification dates) for a given folder ?
Folder can also contain sub-folders.
JSON / CURL then CSV file
Thank you
10-18-2020 06:19 PM
AFAIK, There is no api OOTB that can provide the info you are requesting. May be any V1 APIs may provide some details, search if you can find something.
You can also write a java backed/js repository WebScript that will execute search against repository. The result set will have list of nodeRefs. Using the nodeRef you can extract all the required info and return json or write to excel/csv.
here is an example of js WebScript, you can take reference from here and create/update WebScript's search query accordingly and extract info.
you can update the AND query to return cm:content type instead of folder and extract any other additional info as needed
query = query + ' AND (TYPE:"cm:content")';
10-19-2020 01:05 AM
You can try api-explorer api to get children of given folder.
https://api-explorer.alfresco.com/api-explorer/#!/nodes/listNodeChildren
10-20-2020 04:47 PM
Thank you abhinav for your reply.
- I registered the 2 files desc.xml and html.flt ( .js not yet involved)
- I refreshed the WebScript Extensions Ok
Now what is a site 'test" you referred in the URL
http://127.0.0.1:8080/alfresco/service/abhinav/getFolderInfo?siteShortName=test&skipCount=0&maxCount=100
Site in Alfresco terminology ? if I want to test the scripts against one of my sites ? I am new to alfresco
Thank you
10-20-2020 11:24 PM
Site in Alfresco terminology ? if I want to test the scripts against one of my sites ? I am new to alfresco
Yes Site is a space which you can create via Share interface. To execute the script againt one of your sites, you need to provide the short name of the site. You must register the controller (.get.js) file in order to successfully execute the search query.
Explore our Alfresco products with the links below. Use labels to filter content by product module.