It's all about the answers!

Ask a question

How to update DOORS requirements using REST/OSLC API ?

Prasun Roy (1673813) | asked Oct 25 '12, 12:38 a.m.
 I am trying to update requirements in DOORS using a custom application. I was wondering if I can use the REST or OSLC API to update the requirements. All I want to update is the ValidatedBy attribute with the TestCase URL from RQM. Is there a documentation or sample code available for this.

4 answers

permanent link
Jing Qian (12632) | answered Oct 25 '12, 9:26 a.m.
which version of RQM & DOORS integration are you using?

Prasun Roy commented Oct 25 '12, 9:31 a.m. | edited Oct 25 '12, 9:32 a.m.

I am using RQM 4.0 and DOORS 9.4, in case I duplicate a Test case in RQM that has got requirements linked to it then the requirements in DOORS are not updated with this new Test case. So I want to update the requirements with this new test case URL.

permanent link
Bing Dong Ma (1962) | answered Oct 25 '12, 11:04 p.m.
Hi Prasun,

Assume this feature could help you.   This is one new feature since RQM 4.0.1M4.

permanent link
Chong Yuan Yin (762) | answered Oct 25 '12, 11:48 p.m.
hi Prasun,

if you want to update DOORS requirement via OSLC API, then you're probably encounter with the authentication issue. The DOORS/DWA OAuth is kindof different than other jazz based product, you may need to contact DOORS developers for details

Scarlett Li commented Oct 26 '12, 9:58 a.m.

Hi Prasun,

The codes for update the link is align with OSLC RM specification, if you want to update the Requirement with validateBy link, you need to first get the requirement, then add the validateBy property to the requirement and then make an update call. The logic is straight forward, but as Chong Yuan mentioned above, before running into this logic, you need to first write a client to pass the OAuth, which might take some additional effort.

If you don't need to stick to the RQM 4.0, the recommendation here is upgrade to 4.0.1 (not release yet, but RC builds are aviable now, you can have a try) and use the new repair link feature mentioned by Bing Dong, by using it you are able to detect  and repair the missing links in RQM UI.

Hope this helps,


permanent link
Sudarshan Rao (1863) | answered Oct 29 '12, 1:09 a.m.
Elaborating slightly on Scarlett's response -

You will require DWA to be configured, if you would want to update requirements using OSLC. 
If you have DWA configured, following is how you can update a requirement - 

- Get authenticated using OAuth
  - URLs necessary to get past OAuth is in the root services document.
  - You can access the rootservices document for DOORS in the following location -
- Do a GET on the URL of the requirement that needs updated. This will return all properties of the requirement.
- Add the validatedBy property, with the appropriate value to the requirement
- Do a PUT on the requirement URL, along with ETag (present in Response Header of the previous GET)

Hope that helps.


Chandrahasa Reddy D commented Oct 29 '12, 5:25 a.m. | edited Oct 29 '12, 5:39 a.m.

Any source code example please ? / can you tell me what is the resource URI for requirement in DOORS?

Sudarshan Rao commented Oct 30 '12, 12:16 a.m.

I don't see an option to attach any files here, to provide any XML file sample. Resource URI for requirement is the URL of the object itself. For example - 

Chandrahasa Reddy D commented Oct 30 '12, 6:08 a.m.

Can we use mozilla poster for getting XML data of the requirements using this URL ?..
I tried using poster, but there was an error. please suggest.

Sudarshan Rao commented Oct 30 '12, 6:33 a.m.

I use RESTClient. Haven't tried poster for this. 

Do you have DOORS Web Access configured?
Have you got past OAuth before you do a GET? 

Chandrahasa Reddy D commented Oct 30 '12, 6:55 a.m. | edited Oct 30 '12, 6:58 a.m.

Yea I have configured DWA also.. I did not get OAuth.. I simply using this URL to get XML of the requirement. I am still not sure whether poster can be used or not..
The error is 401 Unauthorised


Prasun Roy commented Oct 30 '12, 5:03 p.m. | edited Oct 30 '12, 5:08 p.m.

I am able to authenticate using OAuth and have an authorized access_token, but now the problem I am facing is that when I try to do a GET on the Requirements URL https://DOORSServer:8445/dwa/rm/urn:rational::1-4ffe24e04da657d1-O-2-00000020

I am being redirected to https://DOORSServer:8445/doors/redirector/?urn=urn:rational::1-4ffe24e04da657d1-O-2-00000020&oauth_token=79cb958e-56d9-4e64-a900-4892c21bab9d&oauth_nonce=1752022424784198&accept=application/rdf+xml&oauth_consumer_key=
Although I am able to query the Catalog & Folder (even cascaded folders) URLs and get XML response

It seems there is something wrong with the Requirements URL because of which DOORS is redirecting the request.

Sudarshan Rao commented Oct 31 '12, 3:14 a.m.

Can't see anything obviously wrong.. 

Can you paste the URL with all parameters (before being re-directed) here? Just wondering if anything is missing there.. 
I presume you do explicitly specify Accept header (it does appear in the redirected URL, but want to confirm).
Another question, are you able to load the object if you directly paste the URL into a browser (https://DOORSServer:8445/dwa/rm/urn:rational::1-4ffe24e04da657d1-O-2-00000020)?

Prasun Roy commented Oct 31 '12, 1:21 p.m.
This is the full URL I am using:

If I paste the requirement URL in browser then the behavior is same browser redirects to the /doors/redirector URL but then the right requirement is displayed in the browser.
The redirector URL seems to be taking us to a page that prompts user to choose between DWA and DOORS client.

Sudarshan Rao commented Nov 08 '12, 3:54 a.m.

Prasun, have you gotten past this? If not, I recommend you to raise a PMR wiht Support, since this will need to be investigated in a structured way. Support can possibly have a remote session with you to identify the problem. 

About your response - are you saying that the response for your GET is giving you a page that asks you to choose between DWA and DOORS Client? If that's the case, it looks like the accept header is not identified for whatsoever reason. I can reproduce that, if I don't specify the Accept header. But when I do, I get the expected xml response.

showing 5 of 9 show 4 more comments

Your answer

Register or to post your answer.