So I'm writing a C#.NET application that will need to be able to read historical data from Rally. Specifically I need to retrieve the total Plan Estimate for a given release for each of the first 7 days of the Release.
I've read that there are basically two ways to do this; via the revision history or via the Lookback API and using POST. I figured the LBAPI would be cleaner and more robust so I went that path. Unfortunately, I've never worked with POST before so I'm not entirely sure what I'm doing.
Here's what I've come up with so far. I feel like I'm either close and missing something blindingly obvious, or I'm totally off:
string uri = @"https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/14457696030/artifact/snapshot/query.js";
DynamicJsonObject data = new DynamicJsonObject();
data["find"] = new DynamicJsonObject();
data["find"]["_ProjectHierarchy"] = 14457702297;
data["find"]["_TypeHierarchy"] = "HierarchicalRequirement";
data["find"]["Children"] = null;
data["find"]["__At"] = "2014-02-02T00Z%22";
data["fields"] = new string[] { "PlanEstimate", "ObjectID", "Name" };
DynamicJsonObject results = API.post(uri, data);
When I use the compiled url in a web browser, I get the right data back:
https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/14457696030/artifact/snapshot/query.js?find={%22_ProjectHierarchy%22:14457702297,%22_TypeHierarchy%22:%22HierarchicalRequirement%22,%22Children%22:null,%22__At%22:%222014-02-02T00Z%22}&fields=[%22ObjectID%22,%22Name%22,%22PlanEstimate%22]&start=0
When I use the C# code above and call:
DynamicJsonObject results = API.post(uri, data);
I get a WebException stating: "The remote server returned an error: (405) Method Not Allowed." which almost sounds like I can't even use that post method to begin with.
Any guidance would be greatly appreciated.