Manage Inactive Jira Users REST API

Manage Inactive Jira Users REST API

Get Users

GET http://localhost:8080/rest/deactivateusers/1.0/reports/list/all/active/users

GET http://localhost:8080/rest/deactivateusers/1.0/reports/list/all/neverlogin/users

GET http://localhost:8080/rest/deactivateusers/1.0/reports/list/all/deactive/users

GET http://localhost:8080/rest/deactivateusers/1.0/reports/list/all/users

Query Parameters:

  • days (Number) - Days

    • Set 0 to get all the users.

  • type (Number)

    • 0 - Since

    • 1 - Before

  • group (String)

Response: [Status: 200]

$ curl -u jirauser -XGET \ http://localhost:8080/rest/deactivateusers/1.0/reports/list/all/active/users?type=0&days=30&group=jira-users





Update User Attributes

POST http://localhost:8080/rest/deactivateusers/1.0/utility/update/user/{username}

Path Parameters:

  • username (String) - Jira username

Query Parameters:

  • newEmail

  • newDisplayName

  • newUserName

  • newStatus

    • deactivate

    • activate

  • addGroup (comma separated groups to add)

  • removeGroup (comma separated groups to remove)

Response: [Status: 200]

$ curl -u superadmin -XPOST -H "Content-Type:application/json" \ "http://localhost:8080/rest/deactivateusers/1.0/utility/update/user/croadmin/? \ newEmail=croadmin@noreply.com" {"status":1,"message":"[Info] Updated User attributes ~ croadmin"} $



Re-Activate Users

Re-Activate User

POST http://localhost:8080/rest/deactivateusers/1.0/utility/re-activate/user/{username}

Path Parameters:

  • username (String) - Jira username

Response: [Status: 200]

Re-Activate User (Legacy)

POST http://localhost:8080/rest/deactivateusers/1.0/utility/reactivate/user/{username}

Path Parameters:

  • username (String) - Jira username

Data Fields:

  • groups (String[]) - Array e.g. ["group1", "group2"]

Response: [Status: 200]



De-Activate Users

De-Activate User

POST http://localhost:8080/rest/deactivateusers/1.0/utility/de-activate/user/{username}

Path Parameters:

  • username (String) - Jira username

Response: [Status: 200]

De-Activate User (Legacy)

POST http://localhost:8080/rest/deactivateusers/1.0/utility/deactivate/user/{username}

Path Parameters:

  • username (String) - Jira username

Response: [Status: 200]



Remove Groups

Remove Defined Groups for User

POST http://localhost:8080/rest/deactivateusers/1.0/utility/removegroups/user

Required Data Fields:

  • username (String) - Jira username

  • groups (String[]) - Array e.g. ["group1", "group2"]

Response: [Status: 200]

Remove All Groups for User

POST http://localhost:8080/rest/deactivateusers/1.0/utility/removeallgroups/user/{username}

Path Parameters:

  • username (String) - Jira username

Response: [Status: 200]



Run User De-activation

Trigger User De-Activation from CLI

POST http://localhost:8080/rest/deactivateusers/1.0/utility/run/userdeactivation

Response: [Status: 200]



Trigger Alert Notification

GET http://localhost:8080/rest/deactivateusers/1.0/form/user/alert/trigger

Response: 200

% curl -u admin -XGET http://localhost:8080/rest/deactivateusers/1.0/form/user/alert/trigger