It's all about the answers!

Ask a question

RTC v4.0.2 REST API - how to get all work items for a particular project


Paul Eaton (823) | asked Jun 24 '14, 9:05 a.m.
 I am trying to use the REST API in RTC version 4.0.2 to get a list of all work items associated with a particular project.

My query is as follows:-

https://jazz-ccm01:9443/ccm/rpt/repository/workitem?fields=workitem/workItem\[projectArea=SCMRM\]/(id|summary)

This generates an error report with the following message:-

HTTP Status 500 - CRRED0105E: Unsupported type name: com.ibm.team.process.ProjectArea

So, my question is: If 'projectArea' is an unsupported type name in RTC 4.0.2 then what should I use instead?

Thanks and regards,

Paul Eaton.

Comments
Kevin Ramer commented Jun 24 '14, 10:25 a.m.

Try projectArea/name='SCMRM' ?


Paul Eaton commented Jun 24 '14, 10:29 a.m.

 Fantastic!


That worked - thank you very much indeed...

Paul. 

Accepted answer


permanent link
Kevin Ramer (4.5k9186201) | answered Jun 24 '14, 10:41 a.m.
Cool !  I think the projectArea would want something that would  look like _4e29helshoq92s01-8  ( you've seen those uuid, I'm sure )

You will be limited to the maximum number of results configured for work item queries as well.
Paul Eaton selected this answer as the correct answer

Comments
Paul Eaton commented Jun 24 '14, 10:49 a.m.

That's a good point - I'm not getting every work item.


How do I configure the maximum to be higher?

Also, is there a way to ask for all work items modified or created in say, the last week or the last 6 hours or between two dates?

Paul. 


Kevin Ramer commented Jun 24 '14, 11:01 a.m.

Yes, the REST api has a pretty rich complement of operators.

I think adjusting the query to:

projectArea/name='SCMRM' and modified >= 'YYYY-MM-DD...' ] 

is approximately the way.  The timestamp would be in 'Z' time using this format:
yyyy-MM-dd'T'hh:mm:ss.SSS'Z' 
( That's a string used in a DataFormat Java class )

There are numerous things here that guide on the RESTApi; this one is pretty good:

https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#Getting_a_schema_for_a_resource

Your answer


Register or 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.