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

How to update DOORS requirements using REST/OSLC API ?

 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.

0 votes



4 answers

Permanent link
which version of RQM & DOORS integration are you using?

0 votes

Comments

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
Hi Prasun,

Assume this feature could help you.   https://jazz.net/downloads/rational-quality-manager/milestones/4.0.1M4?p=news#backlink.   This is one new feature since RQM 4.0.1M4.

0 votes


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

0 votes

Comments

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,

Scarlett


Permanent link
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 -
     http://<dwaServerName>:<port>/dwa/public/rootservices
- 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.

Cheers,
Sudarshan

0 votes

Comments

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

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 - 

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.

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? 

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

https://MyHost:8445/dwa/rm/discovery/service/urn:rational:ers-4fd997ed38995647:4fd997ed38995647-O-1-00000022

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.

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)?
 

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.

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 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,019
× 198

Question asked: Oct 25 '12, 12:38 a.m.

Question was seen: 9,591 times

Last updated: Nov 08 '12, 3:54 a.m.

Confirmation Cancel Confirm