How to Fetch all WI of Specific Type,having Same Attribute Value Using Reportable Rest API
Hello,
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,
Jyoti
One answer
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.
Comments
And to add the Task work items filter, this worked for me:
https://jazz.ibm.com:9443/ccm/oslc/contexts/_po_k4VYHEeu3JKQfbezR9w/workitems?oslc.where=dcterms:Count="8" and dcterms:type="task"
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.