Create New Users using JIRA REST API

最后都变了- 提交于 2019-12-08 09:12:20

问题


I am trying to create new users using JIRA REST API. However the post method syntax description is empty when I am checking the REST documentation. Does anyone know the JSON syntax and the REST handle for creating new users?


回答1:


The JSON Object to use is:

{ 
"name":"username",
"password":"****",
"emailAddress":"username@local",
"displayName":"user name",
"notification":"false" 
}



回答2:


The user creation via REST for JIRA installed version or on-demand version is available using the rest handle

/rest/api/2/user

A POST call should be made with the the following values in the header

Content-Type:application/json

Authentication:Simple username:password

Note: The Username:Password in the authentication header should be encoded in base64 format

The JSON to post is as follows

{
    "name": "<Username>",
    "password": "<Password>",
    "emailAddress": "<Email Address>",
    "displayName": "<Display Name>"
}

The users will be created in jira-users group and the will be active. The active status cannot be changed while creation or after creation using a PUT call. This is a major constraint.




回答3:


I would try calling a GET service for the user resource and use the same jSon object structure to POST creation of a new user.



来源:https://stackoverflow.com/questions/26609725/create-new-users-using-jira-rest-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!