It's all about the answers!

Ask a question

Where is the REST/OSLC API for CRUD of RTC Releases?

Rophy Tsai (23316) | asked Sep 24 '15, 8:44 a.m.
As title, I wasn't able to find the REST / OSLC API for updating Releases.

Accepted answer

permanent link
Fernando Silva (8114) | answered Sep 24 '15, 10:57 a.m.
Try do execute a POST request to <ccm_url_with_port>/service/ informing the Content Type as application/x-www-form-urlencoded and Accept as text/json. The Form Entity must be as follows:

projectAreaItemId: <projectArea_UUID>

Example in Java using Eclipse Lyo's infrastructure:

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import com.sun.jersey.api.representation.Form;

JSONObject releaseObj = new JSONObject();
releaseObj.put("sequenceValue", 3);
releaseObj.put("isArchived", false);
releaseObj.put("isFiltered", false);
releaseObj.put("name", releaseValue);
releaseObj.put("description", "Description");
releaseObj.put("creationDate", new Date().getTime());
releaseObj.put("isModified", true);
JSONArray array = new JSONArray();

Form form = new Form();
form.add("projectAreaItemId", projectAreaUuid);
form.add("releases", array.toString());

JazzRootServicesHelper helper = new JazzRootServicesHelper(rtcUrl, OSLCConstants.OSLC_CM_V2);
JazzFormAuthClient client = helper.initFormClient( userName,password);


ClientResponse response = client
.createResource(rtcUrl+ "/service/",
form, "application/x-www-form-urlencoded", "text/json");

Rophy Tsai selected this answer as the correct answer

Fernando Silva commented Sep 24 '15, 11:09 a.m.

 To update an existing release, first you need to retrieve the list of releases using a GET request to /service/<true_or_false>&projectAreaItemId=<project_area_uuid> using Accept as text/json. Use the response to find the desired release and finally, execute the same POST above but now informing the new data, the itemId and the _eQualifiedClassName:


Regards, Fernando.

2 other answers

permanent link
Rophy Tsai (23316) | answered Sep 24 '15, 1:09 p.m.
 worked perfectly, thanks!

permanent link
jane zhou (6911) | answered Mar 24 '16, 6:36 a.m.
 HI Rophy,

       I have tried on RTC 6.02M2 for this solution, but it is failed. Could you give me some suggestion on how to fix it? Thanks!
     First, I use the following link to GET current release:
<server:port>/ccm /service/<true_or_false>&projectAreaItemId=<project_area_uuid> using Accept astext/json. 

      It can return content properly.


 Then I use it to generate my content with json type:
 { "projectAreaItemId": "_4tIsgOIaEeWAtoLsweCfow","releases":[{"creationDate":1436583600000,           "description":"Desc2","name":"1.2.6","_eQualifiedClassName":"",         "isArchived":false,"isFiltered":false,"itemId":"_mwyCAOuZEeWQNIfNlw2urw","sequenceValue":1,"isModified":true}]}

And use POST method to send it to the same URI for GET
<server:port>/ccm /service/<true_or_false>&projectAreaItemId=<project_area_uuid>

Then system report system internal error. I checked the log, which indicated POST request  triggered something wrong inside RTC.  And I have tried to remove my content with "{ }", the error is the same. So, it should not be my content which trigger the issue.

I am wondering any update for this interface? Maybe it is not supported anymore? or there is BUG here?

CRJAZ1163E NullPointerException error occurred while processing a POST request for CRJAZ1170I The request was made by user "ming_zhou" from "".CRJAZ1166I The stack trace hash is A70752CD706E8465712DDD0A7B667274381C7DB2.
at sun.reflect.GeneratedMethodAccessor50279.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(


Vladimir Amelin commented Nov 01 '16, 5:02 a.m.

Your answer

Register or to post your answer.