5
votes

Was after some help on getting started with calling the Rally REST webservice from a .NET MVC webclient.

I've been given the web service info here:

https://rally1.rallydev.com/slm/doc/webservice/

So I can see that I can use a URL to access information from Rally - Similar to:

https://rally1.rallydev.com/slm/webservice/1.39/task?query=((Owner.Name
= [email protected]) and (State != Completed))&order=Rank&fetch=true&stylesheet=/slm/doc/webservice/browser.xsl

However what I'm not clear on is how to authenticate before making my request?

I'm new to REST web services (have done the SOAP/WSDL awhile back) - so it doesn't seem like with REST you're supposed to add a reference to something to get client classes created? Is this correct? That you just create a HTTPRequest using a URI - and make the call, getting back a HTTPResponse (which I can hopefully do something with).

A lot of examples seem to have specific service/api classes that they're calling methods on or accessing properties - so I'm not sure if that's because they're using SOAP rather than REST - or that they created them themselves.

Maybe I'm looking at the wrong documentation as it seems assumed you know how to be authenticated. Or I'm missing a reference?

1

1 Answers

2
votes

I know the question is old, but this might help someone else. You need to pass a Basic Authentication header with your base64-encoded username and password as part of your get() request. I found this information on an Atlassian documentation page and successfully applied it with Rally API 3.0 (should also work with 2.0). So in your get() request, include a header similar to the following:

auth_header = 'Authorization : Basic ' + base64_encode('username:password')