Hello,
I want to retreive all of one site documents information, my site has 1300 documents so it would be a pain to do that manually
I want to get :
File name
File path
File version
Publication date
Publication status
Publisher
I searched online and found that webscripts can help me do that, but i do not know what i should write in my script in order to get these informations. Could someone help me write the script or send me one that is already ready for deployement?
I was able to get document list with informations i needed, i used this webscript
getChildren.get.desc.xml
<webscript>
<shortname>Get Documents</shortname>
<description>Display all Documents within Folder</description>
<url>/getChildren</url>
<format default="json">argument</format>
<authentication>user</authentication>
</webscript>
getChildren.get.js
function main()
{
var node = [];
node = search.luceneSearch("PATH:\"/app:company_home/st:sites/cm:yoursitename//*\"");
model.totalItems = node.length;
model.results = node;} main();
getChildren.get.json.ftl
totalItems": "${totalItems}
Name;Type;Path;Creator;Created;Modifier;Modified
<#list results as node>
<#if node.isDocument>
${node.name};${node.mimetype};${node.displayPath};${node.properties.creator};${(node.properties.created)?date};${node.properties.modifier};${(node.properties.modified)?date}</#if>
<#if (node_index + 1 < results?size)></#if>
</#list>
Access it via http://127.0.0.1/alfresco/s/getChildren
As you can see i got the informations i needed. But i can see that there are still some properties left that i didn't know how to get them. I can't find the names on node explorator
These are custom properties, is there any way to retrieve them?
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.