From ff2921d50d71dcb9183597d85c79c82e8df39e8a Mon Sep 17 00:00:00 2001 From: Jan Sandbrink Date: Mon, 8 Dec 2014 17:16:24 +0100 Subject: [PATCH 1/2] specify user deletion [ci skip] --- doc/apiv3-documentation.apib | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/doc/apiv3-documentation.apib b/doc/apiv3-documentation.apib index 920bb59bf4..dd7f7bcdc3 100644 --- a/doc/apiv3-documentation.apib +++ b/doc/apiv3-documentation.apib @@ -1693,6 +1693,55 @@ but are also limited to the projects that the current user is allowed to see. [User][] ++ Response 404 (application/hal+json) + + Returned if the user does not exist. + + + Body + + { + "_type": "Error", + "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound", + "message": "The specified user does not exist." + } + +## Delete user [DELETE] + +Permanently deletes the specified user account. + ++ Parameters + + id (required, integer, `1`) ... User id + ++ Response 204 + + Returned if the account was deleted successfully. + ++ Response 403 (application/hal+json) + + Returned if the client does not have sufficient permissions or if deletion of users was disabled in the instance wide settings. + + **Required permission:** Administrators only (exception: users might be able to delete their own accounts) + + + Body + + { + "_type": "Error", + "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission", + "message": "You are not allowed to delete the account of this user." + } + ++ Response 404 (application/hal+json) + + Returned if the user does not exist. + + + Body + + { + "_type": "Error", + "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound", + "message": "The specified user does not exist." + } + # Group Versions ## Linked Properties: From 7fcf64e179598e4b2639282414fa7a3c226a1855 Mon Sep 17 00:00:00 2001 From: Jan Sandbrink Date: Wed, 10 Dec 2014 13:08:45 +0100 Subject: [PATCH 2/2] return 202 on deletion [ci skip] --- doc/apiv3-documentation.apib | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/apiv3-documentation.apib b/doc/apiv3-documentation.apib index dd7f7bcdc3..c58d2da3d2 100644 --- a/doc/apiv3-documentation.apib +++ b/doc/apiv3-documentation.apib @@ -1712,10 +1712,13 @@ Permanently deletes the specified user account. + Parameters + id (required, integer, `1`) ... User id -+ Response 204 ++ Response 202 Returned if the account was deleted successfully. + Note that the response body is empty as of now. In future versions of the API a body + *might* be returned, indicating the progress of deletion. + + Response 403 (application/hal+json) Returned if the client does not have sufficient permissions or if deletion of users was disabled in the instance wide settings.