Many situations in Alfresco support involve some minor modifications of thousands of documents or/and folders. Let's say we need to clean some metadata property, to add or remove some aspect, or renaming filenames for a given bunch of nodes, where bunch is here defined as several thousands of nodes. In these cases, we often obtain the corresponding list of noderefs, and later we process batch actions over the given set of nodes. For example:
There exists several ways of scripting in Alfresco, and I won't say it better than Jeff Potts, so please check this highly recommended blog post, if your are reading.
Between my preferences for these tasks (IMO), I want to mention JavaScript Console for small scripting, normally involving less than a thousand of nodes and harmless operations, then python CMISlib or Groovy scripts, when I want to control a little bit more on the changes and I do not need very fast processing, and a combination of Alfresco REST API batch requests combined with custom JS-based Alfresco webscripts. In most of these situations, I have to obtain a list file with the Alfresco noderefs. For example, imagine that I have to do some minor action over:
By the way, Angel Borroy wrote a very interesting blog post related to this task:
Sometimes in the past, I used postman, but in my case I use the following shell script, normally in some node of Alfresco server using an internal admin user. The script uses curl and jq for parsing JSON requests of Alfresco REST API, usually several requests paginated with 1000 results each where: