Getting the TOTAL of work items based on a query via the REST API
I know how to get work items from the API. For example:
https://SERVER:PORT/jazz/rpt/repository/workitem?fields=workitem/workItem[projectArea/name='ProjectName' and category/name='CategoryName']/(id|itemId|summary|target/name|category/name|type/name|owner/name)&size=500 Unfortunately, that does not return a TOTAL. You have to keep loading the "next" link until it returns no results - there is no way to know how far along you are in loading the query results. Is there a parameter I can pass that will show me the total # of work items I will get from the query above, for example? |
One answer
From the URL it looks like you are using the Reportable REST API documented here:
https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI I don't see anything in there documenting that the total is included in the response representation. It doesn't mean it doesn't exist however. I've pointed this forum post to the appropriate team responsible for the AP. Perhaps they can clarify if what you are looking for exists or not. There is also OSLC related workitems API. You can see in the pagination section related here that it's including the total count you are looking for in the example representation. Perhaps this is an alternative you could use instead. https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20#Pagination Comments
Mike Shkolnik
commented Dec 03 '13, 2:37 p.m.
Thanks much - I do believe this will work, once I figure out the language. I see how to set the project, but I don't see how to set Filed Against to a specific category and Planned For to a specific iteration. I am not able to decipher that syntax from the examples.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.