I'm trying to add Rally functionality to Google Apps Sheets using the Google App Script engine. Everything seems fairly simple, except managing the authentication from a user on the Google Apps system trying to connect with Rally. Google's UrlFetchApp.fetch() function seems to do the trick, except for the Auth bit. Any suggestions?
function RallyQuery(sz, order, fetch, stylesheet)
{
if (typeof fetch === "undefined"){ fetch = true; }
if (typeof stylesheet === "undefined"){ stylesheet = "/slm/doc/webservice/browser.xslsz";}
var result = "[null]";
var query = "https://rally1.rallydev.com/slm/webservice/1.42/task?query=" + sz
+ "&order=" + order
+ "&fetch=" + fetch
+ "&stylesheet=" + stylesheet;
result = UrlFetchApp.fetch(query);
return result;
}