Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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!!

1

0 votes


Accepted answer

Permanent link
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

1 vote

Comments

Thanks Donald, you're a total boss. Exactly what I need and the further explanation really helped!


One other answer

Permanent link

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

0 votes

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">
<ns4:keyword>
<ns4:category value="KC1_V2" term="KC1" />
</ns4:keyword>
</content>
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

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,029
× 7

Question asked: Jul 14 '14, 9:52 a.m.

Question was seen: 6,506 times

Last updated: Aug 12 '14, 3:25 a.m.

Confirmation Cancel Confirm