How to use Rest web service to add members to a group
search cancel

How to use Rest web service to add members to a group


Article ID: 200699


Updated On:


CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager


This tech doc gives detail info regarding how to use Service Desk Rest web service API to add members to a group


Release : 17.1, 17.2, 17.3

Component : Svc Desk Web Services


You can use a POST action to add one member to the group and repeat that for all new members.

The following java script example shows what the URI and payload looks like for adding one member

  String baseURI = "http://my-server-name:8050/caisd-rest";

  String endpointPOST = baseURI + "/grpmem";

  PostMethod post = new PostMethod(endpointPOST);
  post.addRequestHeader("X-AccessKey", accessKey);
  post.addRequestHeader("Accept" , "application/xml");
  post.addRequestHeader("Content-Type", "application/xml; charset=UTF-8");
    "<grpmem>" +
    "<group COMMON_NAME=\"group-name\"/>" +
                      "<member COMMON_NAME=\"Joe, Ling\"/>" +
                      "<manager_flag>0</manager_flag>" +
                      "<notify_flag>0</notify_flag>" +

Please notice that for member tag with COMMON_NAME, you should use the combo_name of the member.