Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How to create a defect in ALM using REST services via JAVA

Hi All,

This may be a big ask. But, i am just trying to find some piece of code for Posting a Defect into ALM via JAVA REST. I was successful in getting a response while using the GET method.

But while posting a defect, i am not sure how to do it. I got the mandatory fields required to post a defect. But can someone help with the code that could post the defect.

Thank you in advance. This will be of great help as i tried so much till now but just need to give up tryind and should start getting the solution since i have a deadline to meet. :(

2 Replies
Damodar-Reddy Acclaimed Contributor.
Acclaimed Contributor.

Re: How to create a defect in ALM using REST services via JAVA


If you are able to GET the defect details, It's very easy for POST.

get the output received & edit the Name (Summary) & id (Defect ID, Remove this in the XML) & Creation Time (Detected on Date) & POST the query. 

I used Postman for REST, it's easy & Just paly around with the change in the data oupput you received from the GET property, You can refer the REST API document for an example (but that varies to Instance based on the User fields & Mandatory fields inside).


(If this helped, accept as solution )
(Posts and opinions made here are my own and do not reflect the opinions of my employer)

Re: How to create a defect in ALM using REST services via JAVA

Thank you for your suggestion, I followed your suggestion, but i get a

Unsupported Media Type exception.

Any suggestion on this. It would be great help.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.