It's all about the answers!

Ask a question

Can I use work item type as query parameter in Reportable REST API?

Vladimir Amelin (69451125) | asked Oct 03 '12, 6:46 a.m.
edited Nov 23 '12, 6:53 a.m.
RTC 3.0.1.x. What I need is to fetch all work items of particular type from all project areas. OSLC REST API is scoped to context (e.g. project area) so I have to use Reportable REST API. 
returns CRRED0105E: Unsupported type name:

Any ideas?

3 answers

Brian Fleming (1.5k1627) | answered Nov 23 '12, 10:04 a.m.
edited Nov 23 '12, 10:24 a.m.
Type is a complex attribute and you need to specify you are filtering on the id of the type.  This works (in 4.0):

Michael Taylor commented Jun 24 '13, 11:24 a.m.

I tried to leverage Brian Fleming's example (above) for a solution I'm working on using RTC 4.0.1.  I wasn't able to get that syntax to work.  But the following worked for me using RTC 4.0.1.

According to (page 19, section you have to add "@" or "attribute::" when filtering on an attribute versus a child element.

In my example below, @id for type worked.  Without @ didn't work in this case.

For some reason unknown to me, @name for type didn't work (with or without @).  So I had to stick with matching on the id.

Michael Taylor commented Jun 24 '13, 11:25 a.m.


https://<server>:<port>/ccm/rpt/repository/workitem?fields=workitem/workItem/(type[ @ id='source_code_ci_-_micses']/*|id|state/*)

        (Note that I added a space before and after the "@" above to keet the answer formatting from being distorted after I submit the answer.)

Michael Taylor commented Jun 24 '13, 3:11 p.m.

I did get Brian's example to work for me after all.



My example works if you need to filter at a lower level.

Vivek Jain (12) | answered Nov 06 '12, 8:48 a.m.
When you try with below mention URL, it will show you all result, it is blank, will not catch type field. Still a open issue.


Vladimir Amelin (69451125) | answered Nov 06 '12, 8:52 a.m.
 Hi Vivek,

I haven't managed to make WI type filters work in Reportable REST API, I had to use OSLC REST API (dc_type attribute).

Your answer

Register or to post your answer.