diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-20 15:31:11 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-20 17:18:40 +0300 |
commit | 8f690604a523115370c011c767dbd76cb85c0f63 (patch) | |
tree | ba5b9a2e5a3c135a33a396cb6f397671d3b937c6 /doc/api | |
parent | bc0b438d13f6bffd8e837f551a5415173f43f9f3 (diff) |
API: Use POST to (un)block a user
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/users.md | 8 | ||||
-rw-r--r-- | doc/api/v3_to_v4.md | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index 626f7e63e3e..852c7ac8ec2 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -659,14 +659,14 @@ Will return `200 OK` on success, or `404 Not found` if either user or email cann Blocks the specified user. Available only for admin. ``` -PUT /users/:id/block +POST /users/:id/block ``` Parameters: - `id` (required) - id of specified user -Will return `200 OK` on success, `404 User Not Found` is user cannot be found or +Will return `201 OK` on success, `404 User Not Found` is user cannot be found or `403 Forbidden` when trying to block an already blocked user by LDAP synchronization. ## Unblock user @@ -674,14 +674,14 @@ Will return `200 OK` on success, `404 User Not Found` is user cannot be found or Unblocks the specified user. Available only for admin. ``` -PUT /users/:id/unblock +POST /users/:id/unblock ``` Parameters: - `id` (required) - id of specified user -Will return `200 OK` on success, `404 User Not Found` is user cannot be found or +Will return `201 OK` on success, `404 User Not Found` is user cannot be found or `403 Forbidden` when trying to unblock a user blocked by LDAP synchronization. ### Get user contribution events diff --git a/doc/api/v3_to_v4.md b/doc/api/v3_to_v4.md index 0e7c5251329..2f82b6e97cc 100644 --- a/doc/api/v3_to_v4.md +++ b/doc/api/v3_to_v4.md @@ -26,3 +26,4 @@ changes are in V4: - Endpoints `/projects/owned`, `/projects/visible`, `/projects/starred` & `/projects/all` are consolidated into `/projects` using query parameters - Return pagination headers for all endpoints that return an array - Removed `DELETE projects/:id/deploy_keys/:key_id/disable`. Use `DELETE projects/:id/deploy_keys/:key_id` instead +- Moved `PUT /users/:id/(block|unblock)` to `POST /users/:id/(block|unblock)` |