It's all about the answers!

Ask a question

Populate the 'iteration' field of a TER through the API

Matthew Vermilion (1468) | asked Jul 09 '13, 5:13 p.m.
I am attempting to populate the 'iteration' field of a TER through the API.  Can someone tell me how this would be done?

I am assuming that I use the 'testphase' element, but don't know how to look up the href for a specific testphase.  What are the inputs to drill down on a specific testphase href?

Can you provide me some direction?  I have experimented a while with the RQMUrlUtility to prototype some solution, but I seem to be spinning on it.

In the end I need a way for the user to provide my program readable input to populate the TER iteration field though the API.

Thanks for your help.

2 answers

permanent link
Hao Wan (1.5k35) | answered Jul 15 '13, 1:35 a.m.
edited Jul 15 '13, 1:37 a.m.
 Hi Matthew,
you can refer to the
and do a GET request to the specific TER and the testphase url would contain in <testphase> section of the returned xml content such as

Matthew Vermilion commented Jul 15 '13, 9:34 a.m.

Hao Wan,

With respect, this answer only distantly relates to my question...  :)  I have spent hours with the RQM API wiki and am familiar with the cheat-sheet.

What I needed is the process by which I can populate a TER testphase given the human readable title.  I don't know how to look up the testphase href based on the title.  It's possible that there are other keys that are required for this drill down - I need your direction here.

Can you help?


Hao Wan commented Jul 15 '13, 10:32 p.m.

Hi Mat,

sorry for the misunderstanding, based on your last comment, I'm a little confused about your problem.
do you mean you want to get the testphase through REST API? if so my answer would resolve your problem.
if not, my guess is that you want to get the testphase url according to the name of the testphase? but my understanding is that if you are using RQM REST API why not get the url directly through the content of the TER?
my further guessing is that you want to get the url through the web ui, but web ui only contains the title, if you testphase is under one testplan and you could find testplan info in TER web ui and go to testplan then you can find the related testphase.
by the way, testphase defined could be found in
and the "Timelines" section

Matthew Vermilion commented Jul 16 '13, 8:40 a.m.

Hao Wan,

My process requires human input of testphase title.  Example "Iteration1".

My process will then use the RQM API to create a TER.

My process does not know how to publish the test phase to the TER given the title.

I hope this is clearer.


permanent link
Paul Slauenwhite (8.3k12) | answered Jul 26 '13, 6:22 a.m.
edited Jul 26 '13, 6:23 a.m.
Hi Matt,

Here are the steps you need to following:

1) Get the specific test phase identifier (URL):

GET https://<host>:<port>/<context root>/service/<project area alias>/testphase/?fields=feed/entry/content/testphase[title='<test phase title>']/identifier

2) Create the TCER with

POST https://<host>:<port>/<context root>/service/<project area alias>/executionworkitem


PUT https://<host>:<port>/<context root>/service/<project area alias>/executionworkitem/<external ID>


 <ns2:executionworkitem xmlns:ns2="" xmlns:ns1="" xmlns:ns3="" xmlns:ns4="" xmlns:ns5="" xmlns:ns6="" xmlns:ns7="" xmlns:ns8="" xmlns:ns9="" xmlns:ns10="" xmlns:ns11="" xmlns:ns12="" xmlns:ns13="" xmlns:ns14="" xmlns:ns16="" xmlns:ns17="">
        <ns2:testphase href="test phase identifier property"/>

Your answer

Register or to post your answer.