RQM REST API - How to query keywords?
My goal is to query/filter the titles of keywords RESTfully, but my attempts haven't been successful. I know https://<host>:<port>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project-area>/keyword would help get me back all the basic fields of all the keywords in a certain project area, but is there a way to search for keywords by title? In my application I'm building, I want to be able to pluck a certain keyword out at any given time. The keywords will all be unique in the project, but without knowing the <id> ahead of time, I could only think of two ways to get the <id> if I knew the title--query for it (what I'm shooting for) or parse through https://<host>:<port>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project-area>/keyword, which would be wasteful since this will be done many, many times.
Any help appreciated!!
Accepted answer
https://<host>:<port>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project-area>/keyword?fields=keyword[title="pattern"]/*
The square bracket is the filter, so replace "pattern" with your actual desired title. The ending /* means retrieving all fields. For more details, see
https://jazz.net/wiki/bin/view/Main/RqmApi#New_fields_selection_and_filteri
One other answer
HI Donald
I need to filter the keywords based on category value.
I am using the below feed request, but it is giving me the entire list of available keywords. Please let me know if I am missing anything.
https://<host>>https://<host>:<port>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project-area>/keyword</a></font><a></a><a>?fields=keyword/category[@term='<categoryterm>' and @value='categoryvalue>']/*
Thanks In Advance
Comments
It works for me somehow, although the output is the category only, since the fields=keyword/category filtering. For example,
https://clm406:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/keyword?fields=keyword/category[@term="KC1" and @value="KC1_V2"]/
give me
<content type="application/xml">To get all the attributes, use this URL.
<ns4:keyword>
<ns4:category value="KC1_V2" term="KC1" />
</ns4:keyword>
</content>
https://clm406:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/keyword?fields=keyword[category/@term="KC1" and category/@value="KC1_V2"]/
Notice the difference between the two "fields" parameters.