It's all about the answers!

Ask a question

How to Fetch all WI of Specific Type,having Same Attribute Value Using Reportable Rest API

jyoti mishra (45139) | asked Feb 20 '21, 6:15 a.m.
edited Feb 20 '21, 6:15 a.m.


I want to fetch the result of all the task WI having custom Attribute named as 'Count' value is less then or equal to '8'..Kindly provide the query to achieve this and also this WI should be from Same Project Area.I am able to get the response of all the WI having some 'count' value ,but not able to filter it.

Thanks and Regards,

One answer

permanent link
Ian Wark (79713550) | answered Feb 25 '21, 2:35 a.m.
There are different APIs. Here is one way..

I use a browser REST client extension such as "RESTClient". Log in normally and then open the REST client in a separate tab.

Add these two Headers:
OSLC-Core-Version: 2.0
Accept: application/rdf+xml

You need to find your URL for workitems services. Use this tip to get it from your ccm rootservices document. That gives you your base URL.

For me it is:

Then you need to build the oslc.where clause on to it and specify the 8 value for your Count attribute."8"

Ian Wark commented Feb 25 '21, 4:06 a.m.
And to add the Task work items filter, this worked for me:

The "and" is a bit unexpected, but the document mentions using it and it seems to work. In the final URL it has to be URL encoded with %20 before and after the "and". The RESTClient does that bit automatically.

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.