It's all about the answers!

Ask a question

Is there a rest api in rqm to validate a test case is present in a project area by using the test case title?

Krishnananda L S (131) | asked Sep 17 '18, 4:48 a.m.


I am trying to validate if a test-case is present in a project area. I need to do it in two ways, 1) by using test-case title 2) by using test-case id ( I got the solution for this)

I have read other post where I can use
1) https://<url>/qm/service/<project area>/testcase
2) https://<url>/qm/service/<project area>/testcase/'test-casae title' (This does not work, for obvious reason, "" cannot be use with string)

The first option returns a huge amount of xml data which is causing problem while transferring it from rqm server.

Is there any way to solve this problem?


Accepted answer

permanent link
Paul Slauenwhite (8.3k12) | answered Sep 17 '18, 6:25 a.m.

Hi Krishnananda,


GET https://<url>/qm/service/<project area>/testcase/<id>

See for the different types of IDs.

Or you can try fields filtering:

GET https://<url>/qm/service/<project area>/testcase?fields=feed/entry/content/testcase[title='test case title']/*

See for more information on fields filtering.

Krishnananda L S selected this answer as the correct answer

Krishnananda L S commented Sep 17 '18, 7:52 a.m. | edited Sep 17 '18, 7:53 a.m.


This is the query I am sending. I get a uri exception - "org.apache.commons.httpclient.URIException: Invalid query" while doing this. What may be wrong here?  <url> is replaced with the correct url, fyi.

Krishnananda L S commented Sep 17 '18, 8:54 a.m.

"See for the different types of IDs. "  There is no ID corresponding to title.

Paul Slauenwhite commented Sep 17 '18, 9:08 a.m.

Hi Krishnananda,

You need to URL-encode the query value for the fields filter.  Also, IDs are not titles.  Use fields filtering for querying based on the title and the resource URL (with the ID) for request a specific resources.

Krishnananda L S commented Sep 17 '18, 10:14 a.m.

 Thanks Paul, I was missing the url encoding part. It is working now. :)

Your answer

Register or to post your answer.