I need to get the list of e.g. user stories for a project in Rally using the REST API's directly.
I can get the project itself by using this URI:
https://rally1.rallydev.com/slm/webservice/v2.0/Project/1234567890
This will give me a JSON document with e.g. 22 "children". But as far as I can see the "children" are actually "Sub projects".
How can I query the items themselves?
I can get the item itself from this URI
https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement/0987654321
... but how do I go from the "project" to the item?
According to the documentation I can query the URI for the project using a syntax like this:
https://rally1.rallydev.com/slm/webservice/v2.0/project?query=QueryString&order=OrderString
My question is: how do I construct the QueryString
? I have a hard time finding any documentation of the format and syntax.
Any help will be greatly appreciated :-)
/Jesper
This is a pretty old question at this point, but maybe you're still looking for help.
If you're looking to load user story data, then you'll want to use this endpoint:
Then you were on the right track regarding providing a query string. Constructing queries can be quite tricky, especially when you have multiple filter criteria. In your case you will want to filter the user stories based on the project they belong to. It's best to use the project's ref as the filter. The ref is just "/project/" followed by the Object ID.
So the query ends up looking like this:
Adding that query as a parameter in the URL gives us this:
Just replace the project ID with the project you're interested in and it should give you the user stories you're looking for. Just note that the default page size is 20. You can increase that by also adding a pageSize parameter to the URL.