1

I recently started using the "removeUnauthorizedSnapshots" parameter with the LBAPI to avoid permissions errors I was previously experiencing. Using the LBAPI to gather details for all the work items in our workspace is MUCH faster than the WSAPI, however since we have ~25,000 leaf stories in our workspace, this data must be gathered using more than one API request. When adding the "limit : Infinity" parameter to the request, you can see in the network traffic that while the second request was in fact made, the "removeUnauthorizedSnapshots" parameter was not included, therefore resulting in a permissions error.

Is there any plan to add official support for this parameter to the LBAPI, rather than adding it to the request manually?

Thanks!

Trever Shick
  • 1,734
  • 16
  • 17
Conner Reeves
  • 1,381
  • 8
  • 13

2 Answers2

1

In the meantime, here is a solution which uses the "loadPage" function, in place of "load":

var allRecords = [];
function getWorkItems(pageNumber) {
    Ext.create('Rally.data.lookback.SnapshotStore', {
        fetch     : ['Name','ObjectID','PlanEstimate'],
        filters   : [{
            property : '__At',
            value    : 'current'
        },{
            property : '_TypeHierarchy',
            value    : 'HierarchicalRequirement'
        },{
            property : 'Children',
            value    : null
        }]
    }).loadPage(pageNumber, {
        params : {
            compress                    : true,
            removeUnauthorizedSnapshots : true
        },
        callback : function(records, operation, success) {
            allRecords = Ext.Array.merge(allRecords, records);
            if (operation.response.StartIndex + operation.response.PageSize >= operation.response.TotalResultCount) {
                //All records loaded
            } else {
                getWorkItems(++pageNumber);
            }
        }
    });
}(1);
Conner Reeves
  • 1,381
  • 8
  • 13
0

I submitted a bug. Thank you for bringing it to our attention. As I commented in the other post we added a story to a backlog to add "removeUnauthorized" to a Rally.data.lookback.SnapshotStore config, but the workaround suggested there in a meantime is apparently flawed and the extra parameters are not applied to subsequent requests, as your scenario with number of total results exceeding 20K shows.

Community
  • 1
  • 1
nickm
  • 5,936
  • 1
  • 13
  • 14