Hi
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(
{"name":"hyunjun.kim1"}
)
print(data)
r = requests.get('http://crucible.hynix.com:8060/rest-service-fecru/admin/groups/Amber-FlashSolution-users/users',
auth=(username, password),
headers=(
{'content-type':'application/json', 'accept':'application/json'}
)
)
test = json.loads(r.text)[u'values']
print test
r = requests.put('http://crucible.hynix.com:8060/rest-service-fecru/admin/groups/Amber-FlashSolution-users/users',
data,
auth=(username, password),
headers=(
{'content-type':'application/json'}
)
)
print r.status_code
============================================
Thanks.