Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi everyone,
I'm developing a plugin to manage Jira/Confluence/Bitbucket user. I need use related Java APIs to add/remove user into/from group and disable/enable user.
I've found some Java APIs such as:
But could anyone help tell Java APIs or examples about below cases?
Java API For Jira:
Java API For Confluence:
Java API For Bitbucket
Thanks a lot.
Hi @Sooxin I have something for Jira:
ApplicationUser user = ...your active user...
ApplicationUser updatedUser = userService.newUserBuilder(user).active(false).build();// where userService is instance of this - com.atlassian.jira.bc.user.UserService
UserService.UpdateUserValidationResult validationResult = userService.validateUpdateUser(updatedUser);
if (validationResult.isValid()) {
userService.updateUser(validationResult);
} else {
log.error("Deactivation of user failed:" + validationResult.getErrorCollection());
}
FOr Confluence, following service looks interesting:
For Bitbucket, this service looks nice, but I can't find a method/service which disables a user :(
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.
@Sooxin ok, let me know if anything is not working or if you find out how to manage it in the Bitbucket :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to @Martin Bayer _MoroSystems_ s_r_o__ , after researching and testing, I think below APIs are helpful:
jira
Confluence
Bitbucket
However, it seems Bitbucket APIs listed above requires some "strange" privileges, My cron in plugin cannot call it successfully. Finally, as an alternative, I wrote a API client by retrofit to call the restful APIs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Sooxin for your feedback... good job :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.