Can anyone provide me AML script to retrieve the number of times documents have been revised within a specific period of time?
This can be broken down into a couple different questions. The first is how to return multiple versions of the same item. By default, an AML query will return only the most recent generation of an item that matches your query parameters. You can override this functionality by specifically including the generation property in the body of the AML request as seen in the example below.
By getting all of the items with a generation greater than 0, we're getting every generation of My Document. The next problem to solve is how to get only the generations that were modified in a specific time-span. For this we can use similarly use a condition on the modified_on property. The sample request below will get all of the revisions of this document that have been made since the beginning of 2019.
This works well enough if we only care about a range from a previous date to now, but we may also want to be get all of the revisions within a specific range of two dates. To do this, we can use an <AND/> property in our request to search on two different dates. The sample below shows how to get only the revisions of the document that were created in the month of January 2019 by using two different conditions.
Aras Labs Software Engineer