It's all about the answers!

Ask a question

filedAgainst, Rest API, and Simple query what am I doing wrong.


Wayne Sepega (611) | asked Jul 23 '14, 8:40 a.m.

I have the following URL, which is supposed to use the simple query to search our work items based on the filedAgainst field:

https://rtc:9443/jazz/oslc/contexts/_2DkGEKbIEd-2ysPalH7cjQ/workitems?oslc.query=rtc_cm:filedAgainst="https://rtc:9443/jazz/resource/itemOid/com.ibm.team.workitem.Category/__xs7j2GwEeOYIJ2V2VkBiQ/"&oslc_cm.properties=dc:title,dc:identifier,rtc_cm:filedAgainst

I've also tried:

https://rtc:9443/jazz/oslc/contexts/_2DkGEKbIEd-2ysPalH7cjQ/workitems?oslc.query=rtc_cm:filedAgainst="__xs7j2GwEeOYIJ2V2VkBiQ"&oslc_cm.properties=dc:title,dc:identifier,rtc_cm:filedAgainst

When running both of these, it appears that the filedAgainst is being ignored, and I get back all the work items in the respective project.

Anyone see anything wrong with the URL? Should I be using a different portion of the API? Searching via the dc:title works just fine so I believe I'm hitting the right URL, I just can't seem to figure out why the filedAgainst isn't working.

Wayne


Comments
Donald Nong commented Jul 24 '14, 5:49 a.m.

oslc.query does not work for me, but oslc.where does. Try

https://rtc:9443/jazz/oslc/contexts/_2DkGEKbIEd-2ysPalH7cjQ/workitems?oslc.where=rtc_cm:filedAgainst="https%3A%2F%2Frtc%3A9443%2Fjazz%2Fresource%2FitemOid%2Fcom.ibm.team.workitem.Category%2F__xs7j2GwEeOYIJ2V2VkBiQ"
Basically you need to percent encode the filedAgaint value before putting in the URI.


Wayne Sepega commented Jul 24 '14, 7:13 a.m.

Where is not working as well, still getting the default list of items.

One answer



permanent link
Wayne Sepega (611) | answered Jul 25 '14, 9:18 a.m.

query is now working for me, not sure why but it appears at times I must use OSLC. and other times OSLC_CM., but one or the other only. I haven't found a place that I can interchange them.

once I changed my url to be :

https://rtc:9443/jazz/oslc/contexts/_2DkGEKbIEd-2ysPalH7cjQ/workitems?oslc_cm.query=rtc_cm:filedAgainst="__xs7j2GwEeOYIJ2V2VkBiQ"&oslc_cm.properties=dc:title,dc:identifier,rtc_cm:filedAgainst

Everything worked.

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.