Get IDs of artifacts changed within a specific date/time interval
Lookback API provides a concise and least expensive syntax for getting artifacts modified within a specific time frame. The endpoint example below will return snapshots created inside a two hour window:
https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/<WORKSAPCE_OID>/artifact/snapshot/query.js?find={"_TypeHierarchy":"
Fetching Revision History is expensive. This means that the subset of the artifacts for which you get RevisionHistory has to be small. In this example only stories updated withing the last 4 weeks are used:
var howFarBack = rally.sdk.util.DateTime.add(new Date(), "week", -4);
var howFarBackISO = rally.sdk.util.DateTime.toIsoString(howFarBack);
function itemQuery() {
var queryObject = {
key: 's', type: 'HierarchicalRequirement',
fetch: 'Name,ObjectID,FormattedID,RevisionHistory,Revisions,RevisionDescription,CreationDate,LastUpdateDate,Description',
query: '(LastUpdateDate > "' + howFarBackISO + '")'
};
//....
The full code for this AppSDK1 app is available in this github repo.