It's all about the answers!

Ask a question

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


Y Deepak (713) | asked Dec 20 '23, 12:43 a.m.

 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

One answer



permanent link
Ralph Schoon (63.5k33646) | answered Jan 02, 3:10 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.

Your answer


Register or 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.