Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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?


0 votes



One answer

Permanent link
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

0 votes

Comments

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

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 479

Question asked: Nov 19 '13, 8:53 p.m.

Question was seen: 7,328 times

Last updated: Dec 03 '13, 2:37 p.m.

Confirmation Cancel Confirm