Is it possible to create and update users and groups in JIRA 5.1.3 through the REST API? If not, what are the alternatives for automation?
Community moderators have prevented the ability to post new answers.
JIRA Command Line Interface has addUser and other user management actions for managing the primary user directory.
Well, I found the solution:
deactivating/disablling a user is the same as removing the user from all groups:
DELETE https://.../group/user?groupname=$groupname&username=$username
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Poul, where I try to remove a user following your example with curl
curl -D- -u kweinheimer:pswd-X DELETE -H "Content-Type: application/json" -k https://jira-dev.mydomain.net/rest/api/2/group/user?groupname=jira-ba&username=myuser
I get this response
{"errorMessages":["Cannot remove user. 'null' does not exist"],"errors":{}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, REST API does not support it yet. No ETA at the moment, but I cannot see any strong reason why it should not be part of JIRA soon.
Currently you would have to resort to old SOAP interface (provided by RPC plugin bundled with JIRA) - http://docs.atlassian.com/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html - which has a methods for manipulating users and groups you need. AFAIK JIRA Command Line Interface (CLI) depends on it too.
Bad news is that SOAP is deprecated as of 6.0 and will most likely be removed in 7.0 (I guess around 2014).
So if you don't want to rely on a soon deprecated stuff, I'd write your own REST service as is already suggested somehere.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It looks like there is a POST in the REST API now to create a user (6.3)
https://answers.atlassian.com/questions/199172/using-rest-api-to-create-a-user-account-in-on-demand-jira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, concerning to REST API documentation http://docs.atlassian.com/jira/REST/latest/#id122896 it is not possible. The only way to do that is to write your own plugin which provides a REST interface.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This feature is not on the roadmap of jira (I think because of security reasons). You have to implement it on your own.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is this functionality being worked on? When can we expect a release?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Is there a way to change the first_name, last_name, display_name and the email_address with a REST call? I was trying to update the fields directly in the database table cwd_user, but couldn't see any changes in UI. We have to change user information for former users because of GDPR.
Thanks a lot for your help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I guess I found a solution I can send a PUT request with these data:
{"name": "xxxx", "emailAddress": "xxxx@email.com","displayName": "xxxx"}
The first_name field will remain empty, but that's fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this one. It worked for me :
curl -u USER:PASS -X DELETE -H "Content-Type: application/json" http://localhost:8722/jira/rest/api/2/group/user?groupname=jira-software-users\&\username=test
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://docs.atlassian.com/jira/REST/latest/#d2e4067
GET/PUT/POST/DELETE user?username=foobar
except that DELETE does not work if foobar has anything assigned to her (amongst other conditions)
Still digging dor a way to deactivate/disablle a user - it is the recommended way, but very hard to find.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I find I can update Full Name but I cannot change a user to be inactive via rest API
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
we had same requirement so developed our own plugin, for this rest api not available yet so suggest you to write your own REST plugin,
checkout the following doc to know how to develop custom rest plugin
https://developer.atlassian.com/display/DOCS/Incomplete+Plugin+Tutorial+-+Writing+REST+Services
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.