How to delete a LUY user via REST API
Users can be deleted via the LUY REST API in two steps.
First, they must be removed from any associated responsibility attributes, comments, history, reports, surveys, and subscriptions. Only after completing this step can the deletion process be finalized.
Similar to the actions available in the LUY UI, the following options can be used:
SUBSTITUTE: This action replaces the deleted user with a different user (value = username).
DELETE: This action removes the entries associated with the deleted user.
NONE: This action indicates that no option can be used, or the user is not assigned or authorized
Send a DELETE call on the endpoint /api/administration/manageUser/ID with the following body (as raw):
'{
"responsibilityAttributes": {
"action": "SUBSTITUTE",
"value": "USERNAME"
},
"authorOfComments": {
"action": "DELETE",
"value": null
},
"authorOfHistory": {
"action": "NONE",
"value": null
},
"authorOfSavedQueries": {
"action": "NONE",
"value": null
},
"authorOfSurveys": {
"action": "NONE",
"value": null
},
"savedQueriesWithLastModificationUser": {
"action": "NONE",
"value": null
},
"subscriptions": {
"action": "NONE",
"value": null
},
"replaceLastModUser": true,
"replaceSurveyRecipients": true,
"removeUser": true
}'
Please note that users will only be removed completely if this step is successful and the option 'removeUser' is set to 'true'. In some cases, it may be necessary to subsequently send a DELETE call to the following endpoint: /api/administration/users/ID (no body required).
If the user intended for deletion is not connected to responsibility attributes, comments, history, reports, surveys, and subscriptions, then it is possible to delete "/api/administration/users/ID" without the preceding step.