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:-


This generates an error report with the following message:-

HTTP Status 500 - CRRED0105E: Unsupported type name:

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.

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

Try projectArea/name='SCMRM' ?

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


That worked - thank you very much indeed...


Accepted answer

permanent link
Kevin Ramer (4.5k6177196) | 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

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?


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:
( 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:

Your answer

Register or to post your answer.