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

How to update enumeration attributes in ELM UI using Java OSLC API?

 Hi Team,


We are trying to update one attribute having enumeration by using HTTP PUT request like below.


String workitemUrl = cnfprop.getWebContextUrl() + "/oslc/workitems/" + workitemid + ".json";
HttpPut httpput = new HttpPut(workitemUrl);
httpput.setHeader("Content-Type", "application/x-oslc-cm-change-request+json");
// Planned For
HttpEntity myEntity = new StringEntity("{\"rtc_cm:foundIn\":{\"rdf:resource\":\"" + ActionItemType + "\"}}");

While updating we are getting one error like below:

HTTP/1.1 409 Conflict, create or update a resource that already exists or has conflicting information.
 
So please share any links or  document to update attributes having enumeration using OSLC API


Thanks in Advance

0 votes



One answer

Permanent link

There is simply not enough information to even start to try to answer. In general, which API is used? Documentation referenced? OSLC? Reportable REST? Which method? Which URL, which headers and additional parameters?

Your workitemUrl is probably not a valid URL. EWM has only limited support for JSON. I am unsure what API you refer to. The public API supported by EWM for updarting work items is OSLC (and the Java API).

"Content-Type", "application/x-oslc-cm-change-request+json" is most likely not a valid content type.

Is there an IF-Match header? Rest of the OSLC headers.

0 votes

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,937
× 7,495
× 1,325

Question asked: Dec 20 '23, 12:43 a.m.

Question was seen: 824 times

Last updated: Jan 02, 3:10 a.m.

Confirmation Cancel Confirm