Remove unnecessary sentences for status codes in the API documentation

parent 843ae9b2
---
title: Remove unnecessary sentences for status codes in the API documentation
merge_request:
author: Luis Alonso Chavez Armendariz
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
Gets a list of access requests viewable by the authenticated user. Gets a list of access requests viewable by the authenticated user.
Returns `200` if the request succeeds.
``` ```
GET /groups/:id/access_requests GET /groups/:id/access_requests
GET /projects/:id/access_requests GET /projects/:id/access_requests
...@@ -61,8 +59,6 @@ Example response: ...@@ -61,8 +59,6 @@ Example response:
Requests access for the authenticated user to a group or project. Requests access for the authenticated user to a group or project.
Returns `201` if the request succeeds.
``` ```
POST /groups/:id/access_requests POST /groups/:id/access_requests
POST /projects/:id/access_requests POST /projects/:id/access_requests
...@@ -94,8 +90,6 @@ Example response: ...@@ -94,8 +90,6 @@ Example response:
Approves an access request for the given user. Approves an access request for the given user.
Returns `201` if the request succeeds.
``` ```
PUT /groups/:id/access_requests/:user_id/approve PUT /groups/:id/access_requests/:user_id/approve
PUT /projects/:id/access_requests/:user_id/approve PUT /projects/:id/access_requests/:user_id/approve
...@@ -129,8 +123,6 @@ Example response: ...@@ -129,8 +123,6 @@ Example response:
Denies an access request for the given user. Denies an access request for the given user.
Returns `200` if the request succeeds.
``` ```
DELETE /groups/:id/access_requests/:user_id DELETE /groups/:id/access_requests/:user_id
DELETE /projects/:id/access_requests/:user_id DELETE /projects/:id/access_requests/:user_id
......
...@@ -158,7 +158,7 @@ Example Response: ...@@ -158,7 +158,7 @@ Example Response:
### Delete an award emoji ### Delete an award emoji
Sometimes its just not meant to be, and you'll have to remove your award. Only available to Sometimes its just not meant to be, and you'll have to remove your award. Only available to
admins or the author of the award. Status code 200 on success, 401 if unauthorized. admins or the author of the award.
``` ```
DELETE /projects/:id/issues/:issue_id/award_emoji/:award_id DELETE /projects/:id/issues/:issue_id/award_emoji/:award_id
...@@ -331,7 +331,7 @@ Example Response: ...@@ -331,7 +331,7 @@ Example Response:
### Delete an award emoji ### Delete an award emoji
Sometimes its just not meant to be, and you'll have to remove your award. Only available to Sometimes its just not meant to be, and you'll have to remove your award. Only available to
admins or the author of the award. Status code 200 on success, 401 if unauthorized. admins or the author of the award.
``` ```
DELETE /projects/:id/issues/:issue_id/notes/:note_id/award_emoji/:award_id DELETE /projects/:id/issues/:issue_id/notes/:note_id/award_emoji/:award_id
......
...@@ -148,10 +148,6 @@ Example response: ...@@ -148,10 +148,6 @@ Example response:
Creates a new Issue Board list. Creates a new Issue Board list.
If the operation is successful, a status code of `200` and the newly-created
list is returned. If an error occurs, an error number and a message explaining
the reason is returned.
``` ```
POST /projects/:id/boards/:board_id/lists POST /projects/:id/boards/:board_id/lists
``` ```
...@@ -184,10 +180,6 @@ Example response: ...@@ -184,10 +180,6 @@ Example response:
Updates an existing Issue Board list. This call is used to change list position. Updates an existing Issue Board list. This call is used to change list position.
If the operation is successful, a code of `200` and the updated board list is
returned. If an error occurs, an error number and a message explaining the
reason is returned.
``` ```
PUT /projects/:id/boards/:board_id/lists/:list_id PUT /projects/:id/boards/:board_id/lists/:list_id
``` ```
...@@ -220,8 +212,6 @@ Example response: ...@@ -220,8 +212,6 @@ Example response:
## Delete a board list ## Delete a board list
Only for admins and project owners. Soft deletes the board list in question. Only for admins and project owners. Soft deletes the board list in question.
If the operation is successful, a status code `200` is returned. In case you cannot
destroy this board list, or it is not present, code `404` is given.
``` ```
DELETE /projects/:id/boards/:board_id/lists/:list_id DELETE /projects/:id/boards/:board_id/lists/:list_id
......
...@@ -212,9 +212,6 @@ Example response: ...@@ -212,9 +212,6 @@ Example response:
} }
``` ```
It returns `200` if it succeeds or `400` if failed with an error message
explaining the reason.
## Delete repository branch ## Delete repository branch
``` ```
...@@ -226,8 +223,7 @@ DELETE /projects/:id/repository/branches/:branch ...@@ -226,8 +223,7 @@ DELETE /projects/:id/repository/branches/:branch
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project |
| `branch` | string | yes | The name of the branch | | `branch` | string | yes | The name of the branch |
It returns `200` if it succeeds, `404` if the branch to be deleted does not exist In case of an error, an explaining message is provided.
or `400` for other reasons. In case of an error, an explaining message is provided.
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/branches/newbranch" curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/branches/newbranch"
...@@ -253,7 +249,6 @@ DELETE /projects/:id/repository/merged_branches ...@@ -253,7 +249,6 @@ DELETE /projects/:id/repository/merged_branches
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project |
It returns `200` to indicate deletion of all merged branches was started.
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/merged_branches" curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/merged_branches"
......
...@@ -62,10 +62,6 @@ Example response: ...@@ -62,10 +62,6 @@ Example response:
## Create a broadcast message ## Create a broadcast message
Responds with `400 Bad request` when the `message` parameter is missing or the
`color` or `font` values are invalid, and `201 Created` when the broadcast
message was successfully created.
``` ```
POST /broadcast_messages POST /broadcast_messages
``` ```
......
...@@ -315,10 +315,6 @@ Example response: ...@@ -315,10 +315,6 @@ Example response:
Creates a new project issue. Creates a new project issue.
If the operation is successful, a status code of `200` and the newly-created
issue is returned. If an error occurs, an error number and a message explaining
the reason is returned.
``` ```
POST /projects/:id/issues POST /projects/:id/issues
``` ```
...@@ -377,10 +373,6 @@ Example response: ...@@ -377,10 +373,6 @@ Example response:
Updates an existing project issue. This call is also used to mark an issue as Updates an existing project issue. This call is also used to mark an issue as
closed. closed.
If the operation is successful, a code of `200` and the updated issue is
returned. If an error occurs, an error number and a message explaining the
reason is returned.
``` ```
PUT /projects/:id/issues/:issue_id PUT /projects/:id/issues/:issue_id
``` ```
...@@ -439,8 +431,6 @@ Example response: ...@@ -439,8 +431,6 @@ Example response:
## Delete an issue ## Delete an issue
Only for admins and project owners. Soft deletes the issue in question. Only for admins and project owners. Soft deletes the issue in question.
If the operation is successful, a status code `200` is returned. In case you cannot
destroy this issue, or it is not present, code `404` is given.
``` ```
DELETE /projects/:id/issues/:issue_id DELETE /projects/:id/issues/:issue_id
...@@ -457,9 +447,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://git ...@@ -457,9 +447,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://git
## Move an issue ## Move an issue
Moves an issue to a different project. If the operation is successful, a status Moves an issue to a different project. If the target project
code `201` together with moved issue is returned. If the project, issue, or
target project is not found, error `404` is returned. If the target project
equals the source project or the user has insufficient permissions to move an equals the source project or the user has insufficient permissions to move an
issue, error `400` together with an explaining error message is returned. issue, error `400` together with an explaining error message is returned.
...@@ -518,11 +506,9 @@ Example response: ...@@ -518,11 +506,9 @@ Example response:
## Subscribe to an issue ## Subscribe to an issue
Subscribes the authenticated user to an issue to receive notifications. If the Subscribes the authenticated user to an issue to receive notifications.
operation is successful, status code `201` together with the updated issue is If the user is already subscribed to the issue, the status code `304`
returned. If the user is already subscribed to the issue, the status code `304` is returned.
is returned. If the project or issue is not found, status code `404` is
returned.
``` ```
POST /projects/:id/issues/:issue_id/subscription POST /projects/:id/issues/:issue_id/subscription
...@@ -576,10 +562,8 @@ Example response: ...@@ -576,10 +562,8 @@ Example response:
## Unsubscribe from an issue ## Unsubscribe from an issue
Unsubscribes the authenticated user from the issue to not receive notifications Unsubscribes the authenticated user from the issue to not receive notifications
from it. If the operation is successful, status code `200` together with the from it. If the user is not subscribed to the issue, the
updated issue is returned. If the user is not subscribed to the issue, the status code `304` is returned.
status code `304` is returned. If the project or issue is not found, status code
`404` is returned.
``` ```
DELETE /projects/:id/issues/:issue_id/subscription DELETE /projects/:id/issues/:issue_id/subscription
...@@ -633,8 +617,7 @@ Example response: ...@@ -633,8 +617,7 @@ Example response:
## Create a todo ## Create a todo
Manually creates a todo for the current user on an issue. If the request is Manually creates a todo for the current user on an issue. If
successful, status code `200` together with the created todo is returned. If
there already exists a todo for the user on that issue, status code `304` is there already exists a todo for the user on that issue, status code `304` is
returned. returned.
......
...@@ -82,9 +82,6 @@ Example response: ...@@ -82,9 +82,6 @@ Example response:
Creates a new label for the given repository with the given name and color. Creates a new label for the given repository with the given name and color.
It returns 200 if the label was successfully created, 400 for wrong parameters
and 409 if the label already exists.
``` ```
POST /projects/:id/labels POST /projects/:id/labels
``` ```
...@@ -121,10 +118,6 @@ Example response: ...@@ -121,10 +118,6 @@ Example response:
Deletes a label with a given name. Deletes a label with a given name.
It returns 200 if the label was successfully deleted, 400 for wrong parameters
and 404 if the label does not exist.
In case of an error, an additional error message is returned.
``` ```
DELETE /projects/:id/labels DELETE /projects/:id/labels
``` ```
...@@ -159,10 +152,6 @@ Example response: ...@@ -159,10 +152,6 @@ Example response:
Updates an existing label with new name or new color. At least one parameter Updates an existing label with new name or new color. At least one parameter
is required, to update the label. is required, to update the label.
It returns 200 if the label was successfully deleted, 400 for wrong parameters
and 404 if the label does not exist.
In case of an error, an additional error message is returned.
``` ```
PUT /projects/:id/labels PUT /projects/:id/labels
``` ```
...@@ -199,11 +188,9 @@ Example response: ...@@ -199,11 +188,9 @@ Example response:
## Subscribe to a label ## Subscribe to a label
Subscribes the authenticated user to a label to receive notifications. If the Subscribes the authenticated user to a label to receive notifications.
operation is successful, status code `201` together with the updated label is If the user is already subscribed to the label, the status code `304`
returned. If the user is already subscribed to the label, the status code `304` is returned.
is returned. If the project or label is not found, status code `404` is
returned.
``` ```
POST /projects/:id/labels/:label_id/subscription POST /projects/:id/labels/:label_id/subscription
...@@ -237,10 +224,8 @@ Example response: ...@@ -237,10 +224,8 @@ Example response:
## Unsubscribe from a label ## Unsubscribe from a label
Unsubscribes the authenticated user from a label to not receive notifications Unsubscribes the authenticated user from a label to not receive notifications
from it. If the operation is successful, status code `200` together with the from it. If the user is not subscribed to the label, the
updated label is returned. If the user is not subscribed to the label, the status code `304` is returned.
status code `304` is returned. If the project or label is not found, status code
`404` is returned.
``` ```
DELETE /projects/:id/labels/:label_id/subscription DELETE /projects/:id/labels/:label_id/subscription
......
...@@ -16,8 +16,6 @@ The access levels are defined in the `Gitlab::Access` module. Currently, these l ...@@ -16,8 +16,6 @@ The access levels are defined in the `Gitlab::Access` module. Currently, these l
Gets a list of group or project members viewable by the authenticated user. Gets a list of group or project members viewable by the authenticated user.
Returns `200` if the request succeeds.
``` ```
GET /groups/:id/members GET /groups/:id/members
GET /projects/:id/members GET /projects/:id/members
...@@ -60,8 +58,6 @@ Example response: ...@@ -60,8 +58,6 @@ Example response:
Gets a member of a group or project. Gets a member of a group or project.
Returns `200` if the request succeeds.
``` ```
GET /groups/:id/members/:user_id GET /groups/:id/members/:user_id
GET /projects/:id/members/:user_id GET /projects/:id/members/:user_id
...@@ -95,8 +91,6 @@ Example response: ...@@ -95,8 +91,6 @@ Example response:
Adds a member to a group or project. Adds a member to a group or project.
Returns `201` if the request succeeds.
``` ```
POST /groups/:id/members POST /groups/:id/members
POST /projects/:id/members POST /projects/:id/members
...@@ -131,8 +125,6 @@ Example response: ...@@ -131,8 +125,6 @@ Example response:
Updates a member of a group or project. Updates a member of a group or project.
Returns `200` if the request succeeds.
``` ```
PUT /groups/:id/members/:user_id PUT /groups/:id/members/:user_id
PUT /projects/:id/members/:user_id PUT /projects/:id/members/:user_id
...@@ -167,8 +159,6 @@ Example response: ...@@ -167,8 +159,6 @@ Example response:
Removes a user from a group or project. Removes a user from a group or project.
Returns `200` if the request succeeds.
``` ```
DELETE /groups/:id/members/:user_id DELETE /groups/:id/members/:user_id
DELETE /projects/:id/members/:user_id DELETE /projects/:id/members/:user_id
......
...@@ -337,9 +337,6 @@ Parameters: ...@@ -337,9 +337,6 @@ Parameters:
} }
``` ```
If the operation is successful, 200 and the newly created merge request is returned.
If an error occurs, an error number and a message explaining the reason is returned.
## Update MR ## Update MR
Updates an existing merge request. You can change the target branch, title, or even close the MR. Updates an existing merge request. You can change the target branch, title, or even close the MR.
...@@ -414,14 +411,9 @@ Parameters: ...@@ -414,14 +411,9 @@ Parameters:
} }
``` ```
If the operation is successful, 200 and the updated merge request is returned.
If an error occurs, an error number and a message explaining the reason is returned.
## Delete a merge request ## Delete a merge request
Only for admins and project owners. Soft deletes the merge request in question. Only for admins and project owners. Soft deletes the merge request in question.
If the operation is successful, a status code `200` is returned. In case you cannot
destroy this merge request, or it is not present, code `404` is given.
``` ```
DELETE /projects/:id/merge_requests/:merge_request_id DELETE /projects/:id/merge_requests/:merge_request_id
...@@ -440,15 +432,14 @@ curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://git ...@@ -440,15 +432,14 @@ curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://git
Merge changes submitted with MR using this API. Merge changes submitted with MR using this API.
If the merge succeeds you'll get a `200 OK`.
If it has some conflicts and can not be merged - you'll get a 405 and the error message 'Branch cannot be merged' If it has some conflicts and can not be merged - you'll get a `405` and the error message 'Branch cannot be merged'
If merge request is already merged or closed - you'll get a 406 and the error message 'Method Not Allowed' If merge request is already merged or closed - you'll get a `406` and the error message 'Method Not Allowed'
If the `sha` parameter is passed and does not match the HEAD of the source - you'll get a 409 and the error message 'SHA does not match HEAD of source branch' If the `sha` parameter is passed and does not match the HEAD of the source - you'll get a `409` and the error message 'SHA does not match HEAD of source branch'
If you don't have permissions to accept this merge request - you'll get a 401 If you don't have permissions to accept this merge request - you'll get a `401`
``` ```
PUT /projects/:id/merge_requests/:merge_request_id/merge PUT /projects/:id/merge_requests/:merge_request_id/merge
...@@ -520,13 +511,11 @@ Parameters: ...@@ -520,13 +511,11 @@ Parameters:
## Cancel Merge When Build Succeeds ## Cancel Merge When Build Succeeds
If successful you'll get `200 OK`. If you don't have permissions to accept this merge request - you'll get a `401`
If you don't have permissions to accept this merge request - you'll get a 401 If the merge request is already merged or closed - you get `405` and error message 'Method Not Allowed'
If the merge request is already merged or closed - you get 405 and error message 'Method Not Allowed' In case the merge request is not set to be merged when the build succeeds, you'll also get a `406` error.
In case the merge request is not set to be merged when the build succeeds, you'll also get a 406 error.
``` ```
PUT /projects/:id/merge_requests/:merge_request_id/cancel_merge_when_build_succeeds PUT /projects/:id/merge_requests/:merge_request_id/cancel_merge_when_build_succeeds
``` ```
...@@ -670,11 +659,8 @@ Example response when an external issue tracker (e.g. JIRA) is used: ...@@ -670,11 +659,8 @@ Example response when an external issue tracker (e.g. JIRA) is used:
## Subscribe to a merge request ## Subscribe to a merge request
Subscribes the authenticated user to a merge request to receive notification. If Subscribes the authenticated user to a merge request to receive notification. If the user is already subscribed to the merge request, the
the operation is successful, status code `201` together with the updated merge status code `304` is returned.
request is returned. If the user is already subscribed to the merge request, the
status code `304` is returned. If the project or merge request is not found,
status code `404` is returned.
``` ```
POST /projects/:id/merge_requests/:merge_request_id/subscription POST /projects/:id/merge_requests/:merge_request_id/subscription
...@@ -747,10 +733,8 @@ Example response: ...@@ -747,10 +733,8 @@ Example response:
## Unsubscribe from a merge request ## Unsubscribe from a merge request
Unsubscribes the authenticated user from a merge request to not receive Unsubscribes the authenticated user from a merge request to not receive
notifications from that merge request. If the operation is successful, status notifications from that merge request. If the user is
code `200` together with the updated merge request is returned. If the user is not subscribed to the merge request, the status code `304` is returned.
not subscribed to the merge request, the status code `304` is returned. If the
project or merge request is not found, status code `404` is returned.
``` ```
DELETE /projects/:id/merge_requests/:merge_request_id/subscription DELETE /projects/:id/merge_requests/:merge_request_id/subscription
...@@ -822,9 +806,8 @@ Example response: ...@@ -822,9 +806,8 @@ Example response:
## Create a todo ## Create a todo
Manually creates a todo for the current user on a merge request. If the Manually creates a todo for the current user on a merge request.
request is successful, status code `200` together with the created todo is If there already exists a todo for the user on that merge request,
returned. If there already exists a todo for the user on that merge request,
status code `304` is returned. status code `304` is returned.
``` ```
......
...@@ -109,8 +109,7 @@ Parameters: ...@@ -109,8 +109,7 @@ Parameters:
### Delete an issue note ### Delete an issue note
Deletes an existing note of an issue. On success, this API method returns 200 Deletes an existing note of an issue.
and the deleted note. If the note does not exist, the API returns 404.
``` ```
DELETE /projects/:id/issues/:issue_id/notes/:note_id DELETE /projects/:id/issues/:issue_id/notes/:note_id
...@@ -234,8 +233,7 @@ Parameters: ...@@ -234,8 +233,7 @@ Parameters:
### Delete a snippet note ### Delete a snippet note
Deletes an existing note of a snippet. On success, this API method returns 200 Deletes an existing note of a snippet.
and the deleted note. If the note does not exist, the API returns 404.
``` ```
DELETE /projects/:id/snippets/:snippet_id/notes/:note_id DELETE /projects/:id/snippets/:snippet_id/notes/:note_id
...@@ -364,8 +362,7 @@ Parameters: ...@@ -364,8 +362,7 @@ Parameters:
### Delete a merge request note ### Delete a merge request note
Deletes an existing note of a merge request. On success, this API method returns Deletes an existing note of a merge request.
200 and the deleted note. If the note does not exist, the API returns 404.
``` ```
DELETE /projects/:id/merge_requests/:merge_request_id/notes/:note_id DELETE /projects/:id/merge_requests/:merge_request_id/notes/:note_id
......
...@@ -644,7 +644,7 @@ Parameters: ...@@ -644,7 +644,7 @@ Parameters:
### Edit project ### Edit project
Updates an existing project Updates an existing project.
``` ```
PUT /projects/:id PUT /projects/:id
...@@ -674,9 +674,6 @@ Parameters: ...@@ -674,9 +674,6 @@ Parameters:
| `lfs_enabled` | boolean | no | Enable LFS | | `lfs_enabled` | boolean | no | Enable LFS |
| `request_access_enabled` | boolean | no | Allow users to request member access | | `request_access_enabled` | boolean | no | Allow users to request member access |
On success, method returns 200 with the updated project. If parameters are
invalid, 400 is returned.
### Fork project ### Fork project
Forks a project into the user namespace of the authenticated user or the one provided. Forks a project into the user namespace of the authenticated user or the one provided.
...@@ -694,8 +691,7 @@ Parameters: ...@@ -694,8 +691,7 @@ Parameters:
### Star a project ### Star a project
Stars a given project. Returns status code `201` and the project on success and Stars a given project. Returns status code `304` if the project is already starred.
`304` if the project is already starred.
``` ```
POST /projects/:id/star POST /projects/:id/star
...@@ -765,8 +761,7 @@ Example response: ...@@ -765,8 +761,7 @@ Example response:
### Unstar a project ### Unstar a project
Unstars a given project. Returns status code `200` and the project on success Unstars a given project. Returns status code `304` if the project is not starred.
and `304` if the project is not starred.
``` ```
DELETE /projects/:id/star DELETE /projects/:id/star
...@@ -837,10 +832,6 @@ Example response: ...@@ -837,10 +832,6 @@ Example response:
Archives the project if the user is either admin or the project owner of this project. This action is Archives the project if the user is either admin or the project owner of this project. This action is
idempotent, thus archiving an already archived project will not change the project. idempotent, thus archiving an already archived project will not change the project.
Status code 201 with the project as body is given when successful, in case the user doesn't
have the proper access rights, code 403 is returned. Status 404 is returned if the project
doesn't exist, or is hidden to the user.
``` ```
POST /projects/:id/archive POST /projects/:id/archive
``` ```
...@@ -926,10 +917,6 @@ Example response: ...@@ -926,10 +917,6 @@ Example response:
Unarchives the project if the user is either admin or the project owner of this project. This action is Unarchives the project if the user is either admin or the project owner of this project. This action is
idempotent, thus unarchiving an non-archived project will not change the project. idempotent, thus unarchiving an non-archived project will not change the project.
Status code 201 with the project as body is given when successful, in case the user doesn't
have the proper access rights, code 403 is returned. Status 404 is returned if the project
doesn't exist, or is hidden to the user.
``` ```
POST /projects/:id/unarchive POST /projects/:id/unarchive
``` ```
......
...@@ -108,8 +108,7 @@ Example response: ...@@ -108,8 +108,7 @@ Example response:
## Delete system hook ## Delete system hook
Deletes a system hook. It returns `200 OK` if the hooks is deleted and Deletes a system hook.
`404 Not Found` if the hook is not found.
--- ---
......
...@@ -40,9 +40,7 @@ Parameters: ...@@ -40,9 +40,7 @@ Parameters:
## Get a single repository tag ## Get a single repository tag
Get a specific repository tag determined by its name. It returns `200` together Get a specific repository tag determined by its name.
with the tag information if the tag exists. It returns `404` if the tag does not
exist.
``` ```
GET /projects/:id/repository/tags/:tag_name GET /projects/:id/repository/tags/:tag_name
...@@ -124,14 +122,12 @@ Parameters: ...@@ -124,14 +122,12 @@ Parameters:
The message will be `nil` when creating a lightweight tag otherwise The message will be `nil` when creating a lightweight tag otherwise
it will contain the annotation. it will contain the annotation.
It returns 201 if the operation succeed. In case of an error, In case of an error,
405 with an explaining error message is returned. status code `405` with an explaining error message is returned.
## Delete a tag ## Delete a tag
Deletes a tag of a repository with given name. On success, this API method Deletes a tag of a repository with given name.
returns 200 with the name of the deleted tag. If the tag does not exist, the
API returns 404.
``` ```
DELETE /projects/:id/repository/tags/:tag_name DELETE /projects/:id/repository/tags/:tag_name
...@@ -150,9 +146,8 @@ Parameters: ...@@ -150,9 +146,8 @@ Parameters:
## Create a new release ## Create a new release
Add release notes to the existing git tag. It returns 201 if the release is Add release notes to the existing git tag. If there
created successfully. If the tag does not exist, 404 is returned. If there already exists a release for the given tag, status code `409` is returned.
already exists a release for the given tag, 409 is returned.
``` ```
POST /projects/:id/repository/tags/:tag_name/release POST /projects/:id/repository/tags/:tag_name/release
...@@ -173,9 +168,7 @@ Parameters: ...@@ -173,9 +168,7 @@ Parameters:
## Update a release ## Update a release
Updates the release notes of a given release. It returns 200 if the release is Updates the release notes of a given release.
successfully updated. If the tag or the release does not exist, it returns 404
with a proper error message.
``` ```
PUT /projects/:id/repository/tags/:tag_name/release PUT /projects/:id/repository/tags/:tag_name/release
......
...@@ -271,8 +271,8 @@ Parameters: ...@@ -271,8 +271,8 @@ Parameters:
- `can_create_group` (optional) - User can create groups - true or false - `can_create_group` (optional) - User can create groups - true or false
- `external` (optional) - Flags the user as external - true or false(default) - `external` (optional) - Flags the user as external - true or false(default)
Note, at the moment this method does only return a 404 error, Note, at the moment this method does only return a `404` error,
even in cases where a 409 (Conflict) would be more appropriate, even in cases where a `409` (Conflict) would be more appropriate,
e.g. when renaming the email address to some existing one. e.g. when renaming the email address to some existing one.
## User deletion ## User deletion
...@@ -449,8 +449,6 @@ Parameters: ...@@ -449,8 +449,6 @@ Parameters:
- `title` (required) - new SSH Key's title - `title` (required) - new SSH Key's title
- `key` (required) - new SSH key - `key` (required) - new SSH key
Will return created key with status `201 Created` on success, or `404 Not found` on fail.
## Delete SSH key for current user ## Delete SSH key for current user
Deletes key owned by currently authenticated user. Deletes key owned by currently authenticated user.
...@@ -581,8 +579,6 @@ Parameters: ...@@ -581,8 +579,6 @@ Parameters:
- `id` (required) - id of specified user - `id` (required) - id of specified user
- `email` (required) - email address - `email` (required) - email address
Will return created email with status `201 Created` on success, or `404 Not found` on fail.
## Delete email for current user ## Delete email for current user
Deletes email owned by currently authenticated user. Deletes email owned by currently authenticated user.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment