User and group management via SOAP
Let us now have a look at the user and group management using SOAP. This is really useful when the users and groups need to be managed from a third-party application.
Getting ready
Create a SOAP client as mentioned in the previous recipes.
How to do it...
Creating a group and user are pretty straightforward. The following is how we do it once the client is created:
//Create group jtricks-test-group RemoteGroup group = jiraSoapService.createGroup(authToken, "jtricks-test-group", null); //Create user jtricks-test-user RemoteUser user = jiraSoapService.createUser(authToken, "jtricks-test-user", "password", "Test User", "[email protected]");
Here, the first snippet creates a group with name jtricks-test-group
. The third argument is a RemoteUser
who can be added to the group as the first user when the group is created. We can leave it as null if the group has to be created empty.
The second snippet creates a user with the relevant details, such as Name
, Password...