RQM REST API - How to query keywords?
I'm kinda stumped on this, so I'm hoping the community can point me in the right direction.
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
Try this:
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 Steven Hu selected this answer as the correct answer
Comments
Steven Hu
commented Jul 15 '14, 12:22 p.m.
Thanks Donald, you're a total boss. Exactly what I need and the further explanation really helped! |
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,
<content type="application/xml">To get all the attributes, use this URL. 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. |
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.