如何使用Python使用Jira Atlassian API创建用户?

时间:2018-07-18 17:19:16

标签: python jira jira-rest-api python-jira

user = dict()

user['name'] = 'test102'

user['password'] = 'Default1'

user['emailAddress'] = 'test@gmail.com'

user['displayName'] = 'TestUser'

user['notification'] = 'true'
encoded = base64.b64encode(b'data to be encoded')
headers = {'content-type': 'application/json', 'Authentication':'Simple',base64.b64encode('username'):base64.b64encode('password')}

user_url='rest/api/2/user'
result = self.post(user_url, data=json.dumps(user), headers=headers)

以加薪失败

  

HTTPError(http_error_msg,response = self)   requests.exceptions.HTTPError:400客户端错误:网址请求错误::   https://server.atlassian.net/rest/api/2/user

0 个答案:

没有答案