REST API related to python script development


I'd like to add the users to the crucible groups by using of REST API.
This was requested by a Korea Customer urgently, so I was trying to develop some script with Python.

However, I can't put the users into the Crucible group.
Here is the source code what I've been developing so far.

Could you please advise which should be changed for that?
import requests
import json

username = "hyunjun.kim1"
password = "thddkwl12"
data = json.dumps(



r = requests.get('', 
auth=(username, password),

{'content-type':'application/json', 'accept':'application/json'}


test = json.loads(r.text)[u'values']
print test

r = requests.put('', 
auth=(username, password),



print r.status_code


1 answer

Hi Hyunjun Kim,

There is an example REST API Python client which covers user management.

create_user("example_user", "1234", "Example User", "")
add_user_to_group("example_user", "example_group")

Your usage of the REST API looks correct. What error are you getting?



Suggest an answer

Log in or Join to answer
Community showcase
Bridget Sauer
Published Mar 09, 2018 in Jira Service Desk

E.L. Fridge's take on education, Jira Service Desk, and creative Jira use cases

...word of mouth, so by 2016, we were working with several other entities on campus to implement Jira Service Desk . The Atlassian motto of “for every team” has really come true for us in this case. We...

325 views 0 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot