It's all about the answers!

Ask a question

How do I get workitems by tags?

Richard Ekblom (1111) | asked Nov 16 '12, 5:25 a.m.

I'm trying to use the RTC REST API (version unknown but the URL below may give a hint) to get a list of workitems that contains a specific tag.

If i execute a GET with URL:[tags=|my_tag|]/(id|summary)

...I get a list of workitems that have "my_tag" set (but ONLY "my_tag" set). 
So what is the URL for listing workitems that have "my_tag" and possibly any additional tags set at the same time??? I have tried wildcards (*) and even XPath functions like contains() without success.

My problem is the same as in topic but it's not solved it seems:


2 answers

permanent link
Lauren Hayward Schaefer (3.3k11427) | answered Nov 16 '12, 7:26 a.m.
Hi Richard,
It looks like the issue was fixed in 2.0.  See  I did a quick test on our server and got the same result you did.  I added a comment to the work item asking if there is any special formatting we should be using.

Richard Ekblom commented Nov 16 '12, 10:51 a.m.

Thank you Lauren! 

permanent link
Rafik Jaouani (5.0k16) | answered Nov 16 '12, 9:47 a.m.

This is a limitation of the syntax of the Rest API URLs. Currently we do not support a 'like' operator. So I would  agree this makes querying using tags unusable. Pelase fell free to raise an enhancement request.

Richard Ekblom commented Nov 16 '12, 10:53 a.m.

Ok, this means that I have to get all workitems and then manually filter on tags. I will take a look at "raise an enhancement request" Thanks Rafik.

Your answer

Register or to post your answer.