Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

What to pass as user in addUser method to create Confluence users?

Anibrata Hari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 28, 2020

Hi,

 

I am trying to create users via Python script. I am using the below wsdl URL:

https://<server-name>/rpc/soap-axis/confluenceservice-v2?wsdl

I am able to use user reactivate and deactivate methods successfully but not able to get the required results from 

void addUser(String token, User  user, String password)

I am not able to find the perfect format to pass the user data since its referred as an object. I am not having any problem passing the strings and thus the below methods are giving me required results.

boolean deactivateUser(String token, String username) 

boolean reactivateUser(String token, String username)

Also would like to add that the SOAP APIs are deprecated but still we have to use that since REST API is not available to create users.

Any assistance on this will be very helpful for me.

 

Thanks in advance

1 answer

1 accepted

0 votes
Answer accepted
Anibrata Hari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 28, 2020

Hi all,

 

Just found out it works if the user info is sent in following format.

{'email': 'newuser@funmail.com', 'fullname': 'new user', 'name':'newuser', 'url': 'https://<server-name>/display/~newuser'}

This will be in the same format whatever is received from getUser(String token, String username) method and the output will be in some object type. The above data can be assigned to a variable and that variable can be passed in the addUser method which will create the user.

In addUser(String token, User  user, String password) another Boolean parameter should be added else it won't work. It will look like below finally in python:

addUser(Token, user, 'some_pass', True)

 

Hope it helps someone.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events