diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-01-16 22:32:21 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-01-16 22:32:21 +0100 |
commit | 35d8e1f8248f3dde4ecc6475dfc3c33f91311119 (patch) | |
tree | d114e96d83bdaeca122ca8f22849a16089d0fb36 | |
parent | 5e3cafdd60e0433a3e6fd4b7038c813d5079c638 (diff) | |
download | gitlab-ce-api-return-204-on-delete.tar.gz |
Remove responses documentation for delete endpointsapi-return-204-on-delete
-rw-r--r-- | changelogs/unreleased/api-return-204-on-delete.yml | 4 | ||||
-rw-r--r-- | doc/api/README.md | 3 | ||||
-rw-r--r-- | doc/api/award_emoji.md | 44 | ||||
-rw-r--r-- | doc/api/boards.md | 13 | ||||
-rw-r--r-- | doc/api/branches.md | 8 | ||||
-rw-r--r-- | doc/api/broadcast_messages.md | 14 | ||||
-rw-r--r-- | doc/api/build_triggers.md | 10 | ||||
-rw-r--r-- | doc/api/build_variables.md | 7 | ||||
-rw-r--r-- | doc/api/deploy_keys.md | 26 | ||||
-rw-r--r-- | doc/api/enviroments.md | 11 | ||||
-rw-r--r-- | doc/api/issues.md | 37 | ||||
-rw-r--r-- | doc/api/labels.md | 34 | ||||
-rw-r--r-- | doc/api/merge_requests.md | 55 | ||||
-rw-r--r-- | doc/api/notes.md | 78 | ||||
-rw-r--r-- | doc/api/projects.md | 52 | ||||
-rw-r--r-- | doc/api/repository_files.md | 9 | ||||
-rw-r--r-- | doc/api/runners.md | 24 | ||||
-rw-r--r-- | doc/api/system_hooks.md | 19 | ||||
-rw-r--r-- | doc/api/tags.md | 6 | ||||
-rw-r--r-- | doc/api/todos.md | 84 |
20 files changed, 8 insertions, 530 deletions
diff --git a/changelogs/unreleased/api-return-204-on-delete.yml b/changelogs/unreleased/api-return-204-on-delete.yml new file mode 100644 index 00000000000..61597c8d43b --- /dev/null +++ b/changelogs/unreleased/api-return-204-on-delete.yml @@ -0,0 +1,4 @@ +--- +title: Return 204 for delete endpoints +merge_request: 8599 +author: Robert Schilling diff --git a/doc/api/README.md b/doc/api/README.md index f65b934b9db..53aa09a3533 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -144,7 +144,7 @@ The following table gives an overview of how the API functions generally behave. | `GET` | Access one or more resources and return the result as JSON. | | `POST` | Return `201 Created` if the resource is successfully created and return the newly created resource as JSON. | | `GET` / `PUT` / `DELETE` | Return `200 OK` if the resource is accessed, modified or deleted successfully. The (modified) result is returned as JSON. | -| `DELETE` | Designed to be idempotent, meaning a request to a resource still returns `200 OK` even it was deleted before or is not available. The reasoning behind this, is that the user is not really interested if the resource existed before or not. | +| `DELETE` | Designed to be idempotent, meaning a request to a resource still returns `204 No Content` if the the request was executed successfully. | The following table shows the possible return codes for API requests. @@ -152,6 +152,7 @@ The following table shows the possible return codes for API requests. | ------------- | ----------- | | `200 OK` | The `GET`, `PUT` or `DELETE` request was successful, the resource(s) itself is returned as JSON. | | `201 Created` | The `POST` request was successful and the resource is returned as JSON. | +| `204 No Content` | The server has fulfilled the request but does not need to return an entity-body. | | `304 Not Modified` | Indicates that the resource has not been modified since the last request. | | `400 Bad Request` | A required attribute of the API request is missing, e.g., the title of an issue is not given. | | `401 Unauthorized` | The user is not authenticated, a valid [user token](#authentication) is necessary. | diff --git a/doc/api/award_emoji.md b/doc/api/award_emoji.md index 58092bdd400..8c367911475 100644 --- a/doc/api/award_emoji.md +++ b/doc/api/award_emoji.md @@ -86,7 +86,7 @@ Parameters: | `id` | integer | yes | The ID of a project | | `awardable_id` | integer | yes | The ID of an awardable | | `award_id` | integer | yes | The ID of the award emoji | - +de ```bash curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji/1 ``` @@ -178,27 +178,6 @@ Parameters: curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji/344 ``` -Example Response: - -```json -{ - "id": 344, - "name": "blowfish", - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://gitlab.example.com/root" - }, - "created_at": "2016-06-17T17:47:29.266Z", - "updated_at": "2016-06-17T17:47:29.266Z", - "awardable_id": 80, - "awardable_type": "Issue" -} -``` - ## Award Emoji on Notes The endpoints documented above are available for Notes as well. Notes @@ -350,25 +329,4 @@ Parameters: curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji/345 ``` -Example Response: - -```json -{ - "id": 345, - "name": "rocket", - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://gitlab.example.com/root" - }, - "created_at": "2016-06-17T19:59:55.888Z", - "updated_at": "2016-06-17T19:59:55.888Z", - "awardable_id": 1, - "awardable_type": "Note" -} -``` - [ce-4575]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4575 diff --git a/doc/api/boards.md b/doc/api/boards.md index c83db6df80c..f80b98f960b 100644 --- a/doc/api/boards.md +++ b/doc/api/boards.md @@ -226,16 +226,3 @@ DELETE /projects/:id/boards/:board_id/lists/:list_id ```bash curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/boards/1/lists/1 ``` -Example response: - -```json -{ - "id" : 1, - "label" : { - "name" : "Testing", - "color" : "#F0AD4E", - "description" : null - }, - "position" : 1 -} -``` diff --git a/doc/api/branches.md b/doc/api/branches.md index ffcfea41453..6453492f940 100644 --- a/doc/api/branches.md +++ b/doc/api/branches.md @@ -234,14 +234,6 @@ In case of an error, an explaining message is provided. curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/branches/newbranch" ``` -Example response: - -```json -{ - "branch_name": "newbranch" -} -``` - ## Delete merged branches Will delete all branches that are merged into the project's default branch. diff --git a/doc/api/broadcast_messages.md b/doc/api/broadcast_messages.md index a3e9c01f335..fecfb142ab1 100644 --- a/doc/api/broadcast_messages.md +++ b/doc/api/broadcast_messages.md @@ -138,17 +138,3 @@ DELETE /broadcast_messages/:id ```bash curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/broadcast_messages/1 ``` - -Example response: - -```json -{ - "message":"Update message", - "starts_at":"2016-08-26T00:41:35.060Z", - "ends_at":"2016-08-26T01:41:35.060Z", - "color":"#000", - "font":"#FFFFFF", - "id":1, - "active": true -} -``` diff --git a/doc/api/build_triggers.md b/doc/api/build_triggers.md index b6459971420..6adefe8c58c 100644 --- a/doc/api/build_triggers.md +++ b/doc/api/build_triggers.md @@ -106,13 +106,3 @@ DELETE /projects/:id/triggers/:token ``` curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d" ``` - -```json -{ - "created_at": "2015-12-23T16:25:56.760Z", - "deleted_at": "2015-12-24T12:32:20.100Z", - "last_used": null, - "token": "7b9148c158980bbd9bcea92c17522d", - "updated_at": "2015-12-24T12:32:20.100Z" -} -``` diff --git a/doc/api/build_variables.md b/doc/api/build_variables.md index 917e9773913..c21d5ab2787 100644 --- a/doc/api/build_variables.md +++ b/doc/api/build_variables.md @@ -119,10 +119,3 @@ DELETE /projects/:id/variables/:key ``` curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/VARIABLE_1" ``` - -```json -{ - "key": "VARIABLE_1", - "value": "VALUE_1" -} -``` diff --git a/doc/api/deploy_keys.md b/doc/api/deploy_keys.md index 284d5f88c55..619e3e0d2ae 100644 --- a/doc/api/deploy_keys.md +++ b/doc/api/deploy_keys.md @@ -152,21 +152,6 @@ DELETE /projects/:id/deploy_keys/:key_id curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/deploy_keys/13" ``` -Example response: - -```json -{ - "updated_at" : "2015-08-29T12:50:57.259Z", - "key" : "ssh-rsa AAAA...", - "public" : false, - "title" : "My deploy key", - "user_id" : null, - "created_at" : "2015-08-29T12:50:57.259Z", - "fingerprint" : "6a:33:1f:74:51:c0:39:81:79:ec:7a:31:f8:40:20:43", - "id" : 13 -} -``` - ## Enable a deploy key Enables a deploy key for a project so this can be used. Returns the enabled key, with a status code 201 when successful. @@ -203,14 +188,3 @@ curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://git | --------- | ---- | -------- | ----------- | | `id` | integer | yes | The ID of the project | | `key_id` | integer | yes | The ID of the deploy key | - -Example response: - -```json -{ - "key" : "ssh-rsa AAAA...", - "id" : 12, - "title" : "My deploy key", - "created_at" : "2015-08-29T12:44:31.550Z" -} -``` diff --git a/doc/api/enviroments.md b/doc/api/enviroments.md index 1299aca8c45..e8224c84a40 100644 --- a/doc/api/enviroments.md +++ b/doc/api/enviroments.md @@ -108,14 +108,3 @@ DELETE /projects/:id/environments/:environment_id ```bash curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/environment/1" ``` - -Example response: - -```json -{ - "id": 1, - "name": "deploy", - "slug": "deploy", - "external_url": "https://deploy.example.gitlab.com" -} -``` diff --git a/doc/api/issues.md b/doc/api/issues.md index dd84afd7c73..11a60fca317 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -582,43 +582,6 @@ DELETE /projects/:id/issues/:issue_id/subscription curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/issues/93/subscription ``` -Example response: - -```json -{ - "id": 93, - "iid": 12, - "project_id": 5, - "title": "Incidunt et rerum ea expedita iure quibusdam.", - "description": "Et cumque architecto sed aut ipsam.", - "state": "opened", - "created_at": "2016-04-05T21:41:45.217Z", - "updated_at": "2016-04-07T13:02:37.905Z", - "labels": [], - "milestone": null, - "assignee": { - "name": "Edwardo Grady", - "username": "keyon", - "id": 21, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/3e6f06a86cf27fa8b56f3f74f7615987?s=80&d=identicon", - "web_url": "https://gitlab.example.com/keyon" - }, - "author": { - "name": "Vivian Hermann", - "username": "orville", - "id": 11, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/5224fd70153710e92fb8bcf79ac29d67?s=80&d=identicon", - "web_url": "https://gitlab.example.com/orville" - }, - "subscribed": false, - "due_date": null, - "web_url": "http://example.com/example/example/issues/12", - "confidential": false -} -``` - ## Create a todo Manually creates a todo for the current user on an issue. If diff --git a/doc/api/labels.md b/doc/api/labels.md index 863b28c23b7..47ad341e1ce 100644 --- a/doc/api/labels.md +++ b/doc/api/labels.md @@ -131,22 +131,6 @@ DELETE /projects/:id/labels curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels?name=bug" ``` -Example response: - -```json -{ - "id" : 1, - "name" : "bug", - "color" : "#d9534f", - "description": "Bug reported by user", - "open_issues_count": 1, - "closed_issues_count": 0, - "open_merge_requests_count": 1, - "subscribed": false, - "priority": null -} -``` - ## Edit an existing label Updates an existing label with new name or new color. At least one parameter @@ -188,7 +172,7 @@ Example response: ## Subscribe to a label -Subscribes the authenticated user to a label to receive notifications. +Subscribes the authenticated user to a label to receive notifications. If the user is already subscribed to the label, the status code `304` is returned. @@ -239,19 +223,3 @@ DELETE /projects/:id/labels/:label_id/subscription ```bash curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/labels/1/subscription ``` - -Example response: - -```json -{ - "id" : 1, - "name" : "bug", - "color" : "#d9534f", - "description": "Bug reported by user", - "open_issues_count": 1, - "closed_issues_count": 0, - "open_merge_requests_count": 1, - "subscribed": false, - "priority": null -} -``` diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 662cc9da733..dadac9263f3 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -753,61 +753,6 @@ DELETE /projects/:id/merge_requests/:merge_request_id/subscription curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/merge_requests/17/subscription ``` -Example response: - -```json -{ - "id": 17, - "iid": 1, - "project_id": 5, - "title": "Et et sequi est impedit nulla ut rem et voluptatem.", - "description": "Consequatur velit eos rerum optio autem. Quia id officia quaerat dolorum optio. Illo laudantium aut ipsum dolorem.", - "state": "opened", - "created_at": "2016-04-05T21:42:23.233Z", - "updated_at": "2016-04-05T22:11:52.900Z", - "target_branch": "ui-dev-kit", - "source_branch": "version-1-9", - "upvotes": 0, - "downvotes": 0, - "author": { - "name": "Eileen Skiles", - "username": "leila", - "id": 19, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/39ce4a2822cc896933ffbd68c1470e55?s=80&d=identicon", - "web_url": "https://gitlab.example.com/leila" - }, - "assignee": { - "name": "Celine Wehner", - "username": "carli", - "id": 16, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/f4cd5605b769dd2ce405a27c6e6f2684?s=80&d=identicon", - "web_url": "https://gitlab.example.com/carli" - }, - "source_project_id": 5, - "target_project_id": 5, - "labels": [], - "work_in_progress": false, - "milestone": { - "id": 7, - "iid": 1, - "project_id": 5, - "title": "v2.0", - "description": "Corrupti eveniet et velit occaecati dolorem est rerum aut.", - "state": "closed", - "created_at": "2016-04-05T21:41:40.905Z", - "updated_at": "2016-04-05T21:41:40.905Z", - "due_date": null - }, - "merge_when_build_succeeds": false, - "merge_status": "cannot_be_merged", - "subscribed": false, - "sha": "8888888888888888888888888888888888888888", - "merge_commit_sha": null -} -``` - ## Create a todo Manually creates a todo for the current user on a merge request. diff --git a/doc/api/notes.md b/doc/api/notes.md index 214dfa4068d..807af05872c 100644 --- a/doc/api/notes.md +++ b/doc/api/notes.md @@ -127,32 +127,6 @@ Parameters: curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/issues/11/notes/636 ``` -Example Response: - -```json -{ - "id": 636, - "body": "This is a good idea.", - "attachment": null, - "author": { - "id": 1, - "username": "pipin", - "email": "admin@example.com", - "name": "Pip", - "state": "active", - "created_at": "2013-09-30T13:46:01Z", - "avatar_url": "http://www.gravatar.com/avatar/5224fd70153710e92fb8bcf79ac29d67?s=80&d=identicon", - "web_url": "https://gitlab.example.com/pipin" - }, - "created_at": "2016-04-05T22:10:44.164Z", - "system": false, - "noteable_id": 11, - "noteable_type": "Issue", - "upvote": false, - "downvote": false -} -``` - ## Snippets ### List all snippet notes @@ -251,32 +225,6 @@ Parameters: curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/snippets/52/notes/1659 ``` -Example Response: - -```json -{ - "id": 1659, - "body": "This is a good idea.", - "attachment": null, - "author": { - "id": 1, - "username": "pipin", - "email": "admin@example.com", - "name": "Pip", - "state": "active", - "created_at": "2013-09-30T13:46:01Z", - "avatar_url": "http://www.gravatar.com/avatar/5224fd70153710e92fb8bcf79ac29d67?s=80&d=identicon", - "web_url": "https://gitlab.example.com/pipin" - }, - "created_at": "2016-04-06T16:51:53.239Z", - "system": false, - "noteable_id": 52, - "noteable_type": "Snippet", - "upvote": false, - "downvote": false -} -``` - ## Merge Requests ### List all merge request notes @@ -379,29 +327,3 @@ Parameters: ```bash curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/merge_requests/7/notes/1602 ``` - -Example Response: - -```json -{ - "id": 1602, - "body": "This is a good idea.", - "attachment": null, - "author": { - "id": 1, - "username": "pipin", - "email": "admin@example.com", - "name": "Pip", - "state": "active", - "created_at": "2013-09-30T13:46:01Z", - "avatar_url": "http://www.gravatar.com/avatar/5224fd70153710e92fb8bcf79ac29d67?s=80&d=identicon", - "web_url": "https://gitlab.example.com/pipin" - }, - "created_at": "2016-04-05T22:11:59.923Z", - "system": false, - "noteable_id": 7, - "noteable_type": "MergeRequest", - "upvote": false, - "downvote": false -} -``` diff --git a/doc/api/projects.md b/doc/api/projects.md index 122075bbd11..4ff7ccbc0ff 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -819,58 +819,6 @@ DELETE /projects/:id/star curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star" ``` -Example response: - -```json -{ - "id": 3, - "description": null, - "default_branch": "master", - "public": false, - "visibility_level": 10, - "ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git", - "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git", - "web_url": "http://example.com/diaspora/diaspora-project-site", - "tag_list": [ - "example", - "disapora project" - ], - "name": "Diaspora Project Site", - "name_with_namespace": "Diaspora / Diaspora Project Site", - "path": "diaspora-project-site", - "path_with_namespace": "diaspora/diaspora-project-site", - "issues_enabled": true, - "open_issues_count": 1, - "merge_requests_enabled": true, - "builds_enabled": true, - "wiki_enabled": true, - "snippets_enabled": false, - "container_registry_enabled": false, - "created_at": "2013-09-30T13:46:02Z", - "last_activity_at": "2013-09-30T13:46:02Z", - "creator_id": 3, - "namespace": { - "created_at": "2013-09-30T13:46:02Z", - "description": "", - "id": 3, - "name": "Diaspora", - "owner_id": 1, - "path": "diaspora", - "updated_at": "2013-09-30T13:46:02Z" - }, - "archived": true, - "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", - "shared_runners_enabled": true, - "forks_count": 0, - "star_count": 0, - "public_builds": true, - "shared_with_groups": [], - "only_allow_merge_if_build_succeeds": false, - "only_allow_merge_if_all_discussions_are_resolved": false, - "request_access_enabled": false -} -``` - ### Archive a project Archives the project if the user is either admin or the project owner of this project. This action is diff --git a/doc/api/repository_files.md b/doc/api/repository_files.md index 8a6baed5987..05d15676d71 100644 --- a/doc/api/repository_files.md +++ b/doc/api/repository_files.md @@ -116,15 +116,6 @@ DELETE /projects/:id/repository/files curl --request PUT --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' 'https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch_name=master&author_email=author%40example.com&author_name=Firstname%20Lastname&commit_message=delete%20file' ``` -Example response: - -```json -{ - "file_name": "app/project.rb", - "branch_name": "master" -} -``` - Parameters: - `file_path` (required) - Full path to file. Ex. lib/class.rb diff --git a/doc/api/runners.md b/doc/api/runners.md index 28610762dca..27d8e7640b2 100644 --- a/doc/api/runners.md +++ b/doc/api/runners.md @@ -210,18 +210,6 @@ DELETE /runners/:id curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6" ``` -Example response: - -```json -{ - "active": true, - "description": "test-1-20150125-test", - "id": 6, - "is_shared": false, - "name": null, -} -``` - ## List project's runners List all runners (specific and shared) available in the project. Shared runners @@ -308,15 +296,3 @@ DELETE /projects/:id/runners/:runner_id ``` curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/9/runners/9" ``` - -Example response: - -```json -{ - "active": true, - "description": "test-2016-02-01", - "id": 9, - "is_shared": false, - "name": null -} -``` diff --git a/doc/api/system_hooks.md b/doc/api/system_hooks.md index 3fb8b73be6d..a9edff799ac 100644 --- a/doc/api/system_hooks.md +++ b/doc/api/system_hooks.md @@ -125,22 +125,3 @@ Example request: ```bash curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/hooks/2 ``` - -Example response: - -```json -{ - "note_events" : false, - "project_id" : null, - "enable_ssl_verification" : true, - "url" : "https://gitlab.example.com/hook", - "updated_at" : "2015-11-04T20:12:15.931Z", - "issues_events" : false, - "merge_requests_events" : false, - "created_at" : "2015-11-04T20:12:15.931Z", - "service_id" : null, - "id" : 2, - "push_events" : true, - "tag_push_events" : false -} -``` diff --git a/doc/api/tags.md b/doc/api/tags.md index 7f78ffc2390..4e84d1ae8b6 100644 --- a/doc/api/tags.md +++ b/doc/api/tags.md @@ -141,12 +141,6 @@ Parameters: - `id` (required) - The ID of a project - `tag_name` (required) - The name of a tag -```json -{ - "tag_name": "v4.3.0" -} -``` - ## Create a new release Add release notes to the existing git tag. If there diff --git a/doc/api/todos.md b/doc/api/todos.md index a5e81801024..a08f1d64e19 100644 --- a/doc/api/todos.md +++ b/doc/api/todos.md @@ -197,84 +197,6 @@ Parameters: curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/todos/130 ``` -Example Response: - -```json -{ - "id": 102, - "project": { - "id": 2, - "name": "Gitlab Ce", - "name_with_namespace": "Gitlab Org / Gitlab Ce", - "path": "gitlab-ce", - "path_with_namespace": "gitlab-org/gitlab-ce" - }, - "author": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/root" - }, - "action_name": "marked", - "target_type": "MergeRequest", - "target": { - "id": 34, - "iid": 7, - "project_id": 2, - "title": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "description": "Et ea et omnis illum cupiditate. Dolor aspernatur tenetur ducimus facilis est nihil. Quo esse cupiditate molestiae illo corrupti qui quidem dolor.", - "state": "opened", - "created_at": "2016-06-17T07:49:24.419Z", - "updated_at": "2016-06-17T07:52:43.484Z", - "target_branch": "tutorials_git_tricks", - "source_branch": "DNSBL_docs", - "upvotes": 0, - "downvotes": 0, - "author": { - "name": "Maxie Medhurst", - "username": "craig_rutherford", - "id": 12, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon", - "web_url": "https://gitlab.example.com/craig_rutherford" - }, - "assignee": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/root" - }, - "source_project_id": 2, - "target_project_id": 2, - "labels": [], - "work_in_progress": false, - "milestone": { - "id": 32, - "iid": 2, - "project_id": 2, - "title": "v1.0", - "description": "Assumenda placeat ea voluptatem voluptate qui.", - "state": "active", - "created_at": "2016-06-17T07:47:34.163Z", - "updated_at": "2016-06-17T07:47:34.163Z", - "due_date": null - }, - "merge_when_build_succeeds": false, - "merge_status": "cannot_be_merged", - "subscribed": true, - "user_notes_count": 7 - }, - "target_url": "https://gitlab.example.com/gitlab-org/gitlab-ce/merge_requests/7", - "body": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "state": "done", - "created_at": "2016-06-17T07:52:35.225Z" -} -``` - ## Mark all todos as done Marks all pending todos for the current user as done. It returns the number of marked todos. @@ -287,10 +209,4 @@ DELETE /todos curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/todos ``` -Example Response: - -```json -3 -``` - [ce-3188]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3188 |