I’ve implemented both approaches for audit reporting across multiple Rally workspaces, so I can provide detailed comparison:
Lookback API Advantages for Historical Analysis
The Lookback API is specifically architected for time-series queries and audit trails. Key benefits:
-
Performance: Lookback stores daily snapshots of all Rally objects, enabling fast historical queries without reconstructing state changes from revision history
-
Lookback Limits: The 120-day query window per request is a hard limit, but manageable:
// Query structure for 18-month analysis
for (let i = 0; i < 6; i++) {
const startDate = addMonths(baseDate, i * 3);
const endDate = addMonths(startDate, 3);
queryLookback({ _ValidFrom: { $gte: startDate, $lt: endDate } });
}
Chunk your 18 months into 6 quarters, aggregate client-side. Each query completes in 20-40 seconds vs 5+ minute timeouts with standard reports.
- TimeboxFact for Aggregation: TimeboxFact objects pre-aggregate metrics at iteration/release level:
{
find: { _TypeHierarchy: 'TimeboxFact', TimeboxType: 'Iteration' },
fields: ['DefectCount', 'DefectsClosed', 'DefectsOpened']
}
This returns sprint-level defect metrics instantly without querying individual defects. Perfect for compliance dashboards showing defect trends by sprint.
- Data Aggregation Strategies:
- Use
$bucket operator for client-side grouping by month/quarter
- Hydrate state fields to get readable values: `hydrate: [‘State’, ‘Priority’]
- Filter by
_ValidFrom and _ValidTo to identify exact state transition dates
Custom Reports Limitations
Standard WSAPI queries and custom reports struggle with historical analysis because:
- They query current object state, requiring complex revision history queries for trends
- No built-in time-series optimization leads to query timeouts above 10k records
- Rally’s report builder has 60-second execution timeout - can’t be extended
Practical Implementation for Audit Reporting
For your 18-month compliance requirement:
- Initial Data Pull: Use Lookback API to extract historical snapshots
{
find: {
_TypeHierarchy: 'Defect',
_ProjectHierarchy: yourProjectOID,
_ValidFrom: { $gte: '2024-04-01T00:00:00.000Z' }
},
fields: ['ObjectID', 'State', 'Priority', 'CreationDate', '_ValidFrom', '_ValidTo'],
hydrate: ['State', 'Priority']
}
- Handle Rate Limits: Standard Rally accounts allow 50 Lookback requests/hour. Implement exponential backoff:
- Retry after 429 responses with 60-second delay
- Queue requests to stay under limit
- Consider upgrading to Rally Premium for higher rate limits if needed
- Client-Side Aggregation: Store Lookback results in local database (PostgreSQL, MongoDB) for complex aggregations:
- Calculate defect aging by subtracting CreationDate from state change timestamps
- Group by month/quarter for trend analysis
- Join with TimeboxFact data for sprint-level context
- Query Timeout Mitigation: If you must use custom reports:
- Add strict date range filters (max 90 days per report)
- Limit to specific projects rather than workspace-level queries
- Use report scheduling for overnight execution
- Export to CSV and aggregate externally
Recommendation
Lookback API is the clear winner for your audit requirements. The 120-day window limit is manageable with proper chunking, and query performance is 5-10x faster than custom reports. TimeboxFact provides efficient sprint-level aggregation for executive dashboards.
Implement a nightly ETL job that pulls Lookback data into a reporting database. This avoids hitting API limits during business hours and enables complex SQL-based aggregations that would timeout in Rally’s report builder. Your audit team gets fast, reliable historical analysis without Rally query timeout issues.