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

0 votes
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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

Suggest an answer

Log in or Sign up to answer