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.
|
4 answers
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.
|
Elaborating slightly on Scarlett's response -
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
Comments 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 ?..
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?
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..
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
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.