RTC v4.0.2 REST API - how to get all work items for a particular project
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.
Accepted answer
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.
You will be limited to the maximum number of results configured for work item queries as well.
Comments
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.
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
Comments
Kevin Ramer
Jun 24 '14, 10:25 a.m.Try projectArea/name='SCMRM' ?
Paul Eaton
Jun 24 '14, 10:29 a.m.Fantastic!