#!/usr/bin/env node
var request = require('request');
var rally = require('rally');
var queryUtils = rally.util.query;
var refUtils = rally.util.ref;
var rallyRestApi = rally(
//any additional request options (proxy options, timeouts, etc.)
}
});
function testit(){
var q = {
type: 'PortfolioItem/L2RoadmapItem', //the type to query
start: 1, //the 1-based start index, defaults to 1
pageSize: 200, //the page size (1-200, defaults to 200)
limit: 10, //the maximum number of results to return- enables auto paging
order: 'Rank', //how to sort the results
fetch: , //the fields to retrieve
query: queryUtils.where('DirectChildrenCount', '>', 0), //optional filter
scope: {
workspace: '/workspace/1111111', //specify to query entire workspace
project: '/project/1111111',
up: false, //true to include parent project results, false otherwise
down: true //true to include child project results, false otherwise
},
requestOptions: {} //optional additional options to pass through to request
};
rallyRestApi.get(q, function(err, resp){
if (err) console.log(err);
else console.log(resp);
});
}
testit();