How to change the status of a user using the Jira Align REST API 2
Summary
Issuing a PATCH request to the API endpoint https://<site-url>/rest/align/api/2/Users/<user-id> with the body below:
[
{
"op": "replace",
"path": "/status",
"value": "Inactive"
}
]
to change the status of a user to Inactivate (i.e. deactivated), results in the status not being changed, although no error was thrown.
Environment
Jira Align
Solution
In order to successfully change the status of a user issuing a PATCH request on the endpoint:
https://<site-url>/rest/align/api/2/Users/<user-id>, you need to use the following bodies.
To Activate :
[
{
"op": "replace",
"path": "/isLocked",
"value": 0
}
]
To deactivate :
[
{
"op": "replace",
"path": "/isLocked",
"value": -1
}
]
For complete documentation, please view the details available in your environment at https://<site-url>/rest/align/api/docs/index.html