It's all about the answers!

Ask a question

Filter work items by tags with reportable rest API of RTC


Jochen Widmaier (22310) | asked Mar 17 '21, 12:51 p.m.

 Hi,


I am trying to get all work items with a specific tag. Is this possible somehow?

My current solution is to retrieve all work items via the reportable REST API of RTC and then filter on client side. But this is a huge overhead.

Thank you,
Jochen

One answer



permanent link
Subramanya Prasad Pilar (4.6k15) | answered Mar 17 '21, 2:21 p.m.
You can try the following:
https://<server>:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[tags=|xyz|]/*
which will return all work items having the tag xyz.
You can note that | is needed as tags are always separated by |, even if there is single tag. You can also use more filters.

Comments
Jochen Widmaier commented Mar 18 '21, 3:16 a.m.

Thank you for your answer. 


I have tried this out. Unfortunately it only returns the work items where the given tag is the only tag. If a work item has also other tags, it won't be included in the result.

Is there any filter possibility like <tag> in <taglist> or <taglist>.contains(<tag>), which returns all work items which contain at least the given tag? 

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.