The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Require some working REST API to activate inactive JIRA user(bot/system user)

shiv_jha
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 6, 2023

Hi Everyone,

We are using self hosted datacenter JIRA, Not 

 

payload = json.dumps({
'active': True
})


query = {
'username': user  #### passing username via loop from list of users(Bot user/service user)to be activated####
}

response = requests.request(
"PUT",
url,
data=payload,
headers=headers_for_update,
params=query,
auth=auth
)
Python script is running without giving any error but inactive user not getting activated, its api document saying username and userKey got deprecated, accountID for users is available only on JIRA cloud not on datacenter, need some working api or solution to activate list of inactive user programmatically /REST API.
userKey

string

This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

username

string

This parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

Below is api link which shows deprecation statement:

 

Thanks and Regards,
Shiv Jha

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Mohamed Benziane
Community Champion
March 7, 2023

Hi,

Welcome to the community

If you are using Data Center you need to use his api
https://docs.atlassian.com/software/jira/docs/api/REST/9.6.0/#api/2/user-updateUser

the word "true" for the active parameter need to be in lower case

TAGS
AUG Leaders

Atlassian Community Events