Getting status code 500 while creating a new requirement instance using ALM REST API using java
While creating a new requirement instance via ALM REST API, I am getting status code 500.
XML which I am using to post: <Entity Type="requirement"><Fields><Field Name="name"><Value>Req123</Value></Field><Field Name="type-id"><Value>123</Value></Field></Fields></Entity>
I am able to easily get anything like defects, requriments. But POST gives me error 500.
Note: Login and other authentication are returrning status code 200. Attaching few of my files. Let me know if any other files are needed.
Please help. It's urgent. Thanks.
Regarding to your xml I'm seeing that you are only including the Entity Type, Field Name and Id.
You will need to confirm what are all the required mandatory fields for the requirements in the project you are trying to post that information. That because those fields cannot be skipped and it will throw an error if you do that so confirm all the mandatory fields and include them in the xml file and try again do the post.
Do you perhaps get a error description which might help to analyze the issue?
Just looking at the code I use in the GDPR Content Pack (you can have a look at function fktCreateItemALMQC): I set values for requirement name, description, type-id and parent-id. I am pretty sure type-id and parent-id are mandatory fields (please have a look at the docs - or just try it).