Service URL: DELETE /users/{userId}
Request Headers:
site_subject – JWT – The id of the site / user using the API. Required.
Response Body:
200 – Success OK
Remarks
Deletes a user given a user id as a path parameter. The privilege of the caller must be checks. The site_subject must be valid user and have the correct privilege to delete a user.
Scenarios:
# | Scenario | Outcome | Expected Behavior | Status Code | Response |
---|---|---|---|---|---|
1 | The user requires a request to delete an existing user | Success | The user is deleted and a success response is returned | 200 | Success |
2 | The user requires a request to delete a user which doesn’t exist | BadRequest | The user is not deleted and a bad request error response is returned, | 400 | ErrorResponse – User not delete. User does not existing. Bad request. |
Example Request
{
"user" : {
"displayName" : "james.hanson.enactor",
"userId" : "20",
"isTemplate" : false,
"address" : {
"countryCodeId" : { },
"typeId" : { },
"county" : "Hertfordshire",
"postCode" : "SG14 1PB",
"street1" : "Enactor House",
"street2" : "1 Bluecoats Avenue",
"town" : "Hertford",
"isTemplate" : false
},
"userName" : {
"surname" : "Hanson",
"forename": "James"
}
}
}