summaryrefslogtreecommitdiff
path: root/doc/api/snippets.md
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2019-06-04 12:03:48 +0000
committerAchilleas Pipinellis <axil@gitlab.com>2019-06-04 12:03:48 +0000
commit5fd70f1779fa9ea0bd5eda523833996f71d0e706 (patch)
tree27aa4cb0a5713aa7bca5eb8a5d1180d00e414089 /doc/api/snippets.md
parent72797b30479b8649cd4e4b42bb940093648daa9c (diff)
parentd2ea615415311e7da1daf6b0a4e5c3a23fb2f1c2 (diff)
downloadgitlab-ce-patch-66.tar.gz
Merge branch 'master' into 'patch-66'patch-66
# Conflicts: # doc/administration/high_availability/gitaly.md
Diffstat (limited to 'doc/api/snippets.md')
-rw-r--r--doc/api/snippets.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/api/snippets.md b/doc/api/snippets.md
index f90447e124e..1ce0b1e7a62 100644
--- a/doc/api/snippets.md
+++ b/doc/api/snippets.md
@@ -165,15 +165,15 @@ Parameters:
|:--------------|:-------|:---------|:---------------------------------------------------|
| `title` | string | yes | Title of a snippet. |
| `file_name` | string | yes | Name of a snippet file. |
-| `content` | string | yes | Content of a snippet. |
+| `code` | string | yes | Content of a snippet. |
| `description` | string | no | Description of a snippet. |
-| `visibility` | string | no | Snippet's [visibility](#snippet-visibility-level). |
+| `visibility` | string | yes | Snippet's [visibility](#snippet-visibility-level). |
Example request:
```sh
curl --request POST \
- --data '{"title": "This is a snippet", "content": "Hello world", "description": "Hello World snippet", "file_name": "test.txt", "visibility": "internal" }' \
+ --data '{"title": "This is a snippet", "code": "Hello world", "description": "Hello World snippet", "file_name": "test.txt", "visibility": "internal" }' \
--header 'Content-Type: application/json' \
--header "PRIVATE-TOKEN: valid_api_token" \
https://gitlab.example.com/api/v4/snippets
@@ -222,14 +222,14 @@ Parameters:
| `title` | string | no | Title of a snippet. |
| `file_name` | string | no | Name of a snippet file. |
| `description` | string | no | Description of a snippet. |
-| `content` | string | no | Content of a snippet. |
+| `code` | string | no | Content of a snippet. |
| `visibility` | string | no | Snippet's [visibility](#snippet-visibility-level). |
Example request:
```sh
curl --request PUT \
- --data '{"title": "foo", "content": "bar"}' \
+ --data '{"title": "foo", "code": "bar"}' \
--header 'Content-Type: application/json' \
--header "PRIVATE-TOKEN: valid_api_token" \
https://gitlab.example.com/api/v4/snippets/1