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

How to modify Artifact Categories and Custom Attributes of RQM project area using OSLC OR REST API

The RQM REST API does not support OSLC API to perform CRUD operation. (https://jazz.net/wiki/bin/view/Main/RqmApi#Resources_and_their_Supported_Op).

Is there any other way that we can perform CRUD operation on project area properties in RQM like Artifact Categories?

0 votes


Accepted answer

Permanent link
Not quite sure why you said RQM REST API does not support CRUD operations. It's clearly shown in the table that you quoted that such operations are supported. Respectively, you would use POST, GET, PUT and DELETE operations. Or do I miss something?
ast java selected this answer as the correct answer

0 votes

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.

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

showing 5 of 10 show 5 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
× 7,495
× 1,220
× 478
× 233
× 218
× 12

Question asked: Apr 04 '16, 2:20 p.m.

Question was seen: 3,797 times

Last updated: Apr 11 '16, 8:24 a.m.

Confirmation Cancel Confirm