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

Can't create new executionworkitem (API PUT request)

(using Quality Management 7.0.2)

I'm trying to use the same procedure that I use to create a new execution result, in which I make a PUT request to the following URL:

https://<url>:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<area>/executionresult

with the XML contents of the new execution request that I want to create and it works OK.
But if I try to create a new execution record with:

https://<url>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<area>/executionworkitem
I get a 400 (bad request) response, with the message: "No se puede crear o actualizar un recurso de tipo executionworkitem con un ID que falta"
(Spanish) that means: can't create or update a resource of type executionworkitem with a missing ID.
But the ID should be automatically created like when I create an execution result, so, what could be the problem?

I've also tried to add an ID to the end of the URL (e.g. executionworkitem/2) but it does not work,
the response in that case is an XML with the first executionworkitem.

Instead of my custom XML I've also tried to upload an XML from an existing executionworkitem with the same result.

0 votes


Accepted answer

Permanent link

Thanks for the links.


It turns out I was wrong in one of my assumptions, since I was trying to create an executionworkitem for a test case that already had an executionworkitem.

It only works if the test case has no executionworkitem associated to it.

Apart from that, the original request works by using a POST.

PUT can also be used if the identifier is specified at the end of the URL, like executionworkitem/myworkitem

Ralph Schoon selected this answer as the correct answer

0 votes


2 other answers

Permanent link

 PUT is always only used for update operations. The API complains that the ID of the item to update is missing and likely rightly so.


POST is usually the request type that is used to create a new item. I do not know if the API you are using supports POST.

0 votes


Permanent link

When I send a POST request to the executionworkitem URL, no new element is created.


I receive a 200 reply, but its contents are the XML of the first existing executionworkitem:

executionworkitem/urn:com.ibm.rqm:executionworkitem:1

The XML that I try to upload includes the title and related testcase.

If I remove the testcase, the error shown is:
AQXEX5062E The resource "title" can't be created because the referenced test case does not exist in the server.

But it contains the URL of an existing test case.

Here is the XML I am using:

Thanks

0 votes

Comments

 The documentation for the REPORTABLE REST API of ETM can be found here: https://jazz.net/wiki/bin/view/Main/RqmApi


This includes what methods might and might not be supported, required headers etc. I have not played with that API that much, but I assume it is for reporting and if creating items is possible it should be documented here for which items.

Getting a 200 back does not mean anything. If you make a request without being logged in, you can get a 200 back and response contains HTML that complains about java script, dependent on the redirection policies.  

I don't know the API, so I can't debug your stuff.

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
× 10,938

Question asked: Jan 26 '22, 10:45 a.m.

Question was seen: 1,351 times

Last updated: Jan 27 '22, 10:20 a.m.

Confirmation Cancel Confirm