Forums

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

How to add users using Python ?

onebuckethuso
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!
March 7, 2018

Hello people this is my first question.

I've been looking for the answer all this morning.

I'm using jirapy extension to use jira API. I've successfully connected to the system and created a new user like; 

jira.add_user(huseyin_test, huseyin@jira.com, directoryId=1, password=None, fullname='Test Hüseyin', notify=True, active=True, ignore_existing=False)

The problem is when I add a new user I can't assing an organization to the new user. 

guess directoryId is the thing I'm looking for. 

If it is, how can I learn directoryId's of the organizations ?

Regards

Hüseyin

1 answer

0 votes
Mohamed Benziane
Community Champion
September 10, 2018

Hi Hüseyin,

Here a documentation about organisation and API, you can try to call /rest/servicedeskapi/organization, this will give you all organization with their names and ID's. 

You can use the JSON library to deal with the content you'll receive.

Hope it helps

 

Regards

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events