How to modify Artifact Categories and Custom Attributes of RQM project area using OSLC OR REST API
Accepted answer
Comments
Yes. You are correct but we can perform CRUD Operations with respect to a Test Plan, Tesct Case, etc,. what i am asking is there any API which gets the overall categories of a project area.
i am able to get all categories of a project area using Rest API url -GET Method
https://localhost:8080/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/"Project+Area"/category
And my question here is whether i am able to update / Create category value using PUT and POST methods of rest api?
Of course you can. You do it in a way similar to what you would for Test Plan, Test Case and etc.
I tried updating category value using PUT method. I have changed the category value in updated xml (Response which i got using above mentioned url was updated with new category title) and pasted in request body and tried to update (PUT) i am getting 400 error.
i saw many links which updates a test plan or test case category but here i need to change the project property - Artefact Categories on whole.
Please help me to get this category value updated using rest API.
Without the details, it's very hard to tell what went wrong with your testing. Can you please elaborate?
Yes Donald, Sure i will explain in detail
XML Response:
(pasted only one entry)
<entry xmlns="http://www.w3.org/2005/Atom">
<id>https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Playground+%28Quality+Management%29/category/urn:com.ibm.rqm:category:_qjlmgORgEeWdgdz6u1Fd6Q</id>
<updated>2016-03-07T12:32:11.043Z</updated>
<title type="text">Testing Category</title>
<summary type="text">
</summary>
<link href="https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Playground+%28Quality+Management%29/category/urn:com.ibm.rqm:category:_qjlmgORgEeWdgdz6u1Fd6Q" rel="alternate" type="application/xml" title=""/>
</entry>
I used GET method to fetch all categories and now i tried to update one category naming Testing Category to Testing Category Modified so i changed the title value as <title type="text">Testing Category Modified</title> and pasted in request body then i performed PUT Method to update. when i send request i got 400 error.
Which URL did you use for the PUT operation? You should do a GET and then a PUT against the below URL.
https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Playground+%28Quality+Management%29/category/urn:com.ibm.rqm:category:_qjlmgORgEeWdgdz6u1Fd6Q
Yes i tried PUT against the above URL but still 400 Bad request error.
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:660) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:256) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:251) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:118) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:1061)
I am sorry Donald my input xml was wrong so that i could not update the value.
Now i can update my category value. i have rectified my fault
Thank you