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

Help with REST query for work items

Hello!

I am trying to retrieve all workitems in our timeline via the REST interface. My query is as follows:
https://<server>:<port>/ccm/rpt/repository/workitem?fields=workitem/workItem/(id|summary|target/(name)|tags)

Unfortunately, I'm only getting work items for one particular iteration within the timeline rather than getting all work items back. Also, it appears that exactly 100 items are coming back, which I imagine is not a coincidence. So: 1) is this query correct?, 2) is there a limit on the number of results that the REST interface will return, and 3) can the limit be configured?

Thank you!

0 votes



One answer

Permanent link
Hello!

I am trying to retrieve all workitems in our timeline via the REST interface. My query is as follows:
https://<server>:<port>/ccm/rpt/repository/workitem?fields=workitem/workItem/(id|summary|target/(name)|tags)

Unfortunately, I'm only getting work items for one particular iteration within the timeline rather than getting all work items back. Also, it appears that exactly 100 items are coming back, which I imagine is not a coincidence. So: 1) is this query correct?, 2) is there a limit on the number of results that the REST interface will return, and 3) can the limit be configured?

Thank you!


Hi Kate,
You can append the &size=25&pos=100 to the end of your REST URL. If you notice the very first element in XML document for Workitems returned is workItems. It includes a url that you can use to get the next set of workitems. By default the size is set to 100. You can add the name value pair to the end of your REST URL with however many workitems you want returned. Also notice there is a position parameter which lets you know if this is the last position of results. for example if size=100 and position=100 you are at the end of all the available workitems. See example below.

Carlos Ferreira

SSE Jumpstart Team

https://localhost:9443/ccm/rpt/repository/workitem?fields=workitem%2FworkItem%5BprojectArea%2Fname%3D%27Cool%20Project%27%5D%2F%28id%7Csummary%7Cdescription%7Cmodified%7Cid%7CuniqueId%7CcommentCount%7CsubscriberCount%29&id=_2SkWOzGsEeGHWYRlGVQuYg&size=100&pos=100

0 votes

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

Question asked: Nov 29 '11, 3:57 p.m.

Question was seen: 6,926 times

Last updated: Nov 29 '11, 3:57 p.m.

Confirmation Cancel Confirm