How to add a group and owner to a group using Rest API calls in Delegated Group Management

This article helps you to create a group or add an owner to a group using Rest API.

Instructions

  1. Execute the below curl command to add a new group. 

    curl -u username:password -X POST --insecure -d '{"group":"group_name"}' -H "Content-Type: application/json" -v https://www.domain.com/rest/wittified/delegated-groups/1.0/configure/add-group | json_pp

    For example, if you replace the group_name as “Anchor” in the above curl command, along with the other details, a "Anchor" group will be created in  the Delegated Group Management as shown in the below screenshot



  2. Execute the below curl command to add an owner to a group.

    curl -u username:password -X POST --insecure -d '{"group":"group_name","userKey":"user_name"}' -H "Content-Type: application/json" -v https://www.domain.com/rest/wittified/delegated-groups/1.0/configure/add-owner | json_pp

    For example, if you replace the group_name as “Anchor” and  user_name as admin in the above curl command, along with the other details, an admin will be added as an owner to the Anchor group in the Delegated Group Management as shown in the below screenshot.



  • Remove --insecure from the above command if your URL contains HTTP protocol.
  • Make sure to update the username, password, user_name, group _name and "https://www.domain.com" accordingly to the above two curl commands as per the environment details.