summaryrefslogtreecommitdiff
path: root/doc/api/snippets.md
diff options
context:
space:
mode:
authorBen Bodenmiller <bbodenmiller@hotmail.com>2019-08-31 10:21:29 +0000
committerBen Bodenmiller <bbodenmiller@hotmail.com>2019-08-31 10:21:29 +0000
commit8898ea87bae5b171ec2d22772e3b0d10a2f73975 (patch)
treed66514b646191d79f95346886be9481ec0cb2d64 /doc/api/snippets.md
parentcc70c6a54aa64425dfa8a3896625b308a83536c3 (diff)
parent195ac30514e98b0f97bd191183124f06d1d221fc (diff)
downloadgitlab-ce-patch-73-move-storage-shards.tar.gz
Merge branch 'master' into 'patch-73-move-storage-shards'patch-73-move-storage-shards
# Conflicts: # app/models/project.rb # spec/models/project_spec.rb
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 1ce0b1e7a62..f90447e124e 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. |
-| `code` | string | yes | Content of a snippet. |
+| `content` | string | yes | Content of a snippet. |
| `description` | string | no | Description of a snippet. |
-| `visibility` | string | yes | Snippet's [visibility](#snippet-visibility-level). |
+| `visibility` | string | no | Snippet's [visibility](#snippet-visibility-level). |
Example request:
```sh
curl --request POST \
- --data '{"title": "This is a snippet", "code": "Hello world", "description": "Hello World snippet", "file_name": "test.txt", "visibility": "internal" }' \
+ --data '{"title": "This is a snippet", "content": "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. |
-| `code` | string | no | Content of a snippet. |
+| `content` | string | no | Content of a snippet. |
| `visibility` | string | no | Snippet's [visibility](#snippet-visibility-level). |
Example request:
```sh
curl --request PUT \
- --data '{"title": "foo", "code": "bar"}' \
+ --data '{"title": "foo", "content": "bar"}' \
--header 'Content-Type: application/json' \
--header "PRIVATE-TOKEN: valid_api_token" \
https://gitlab.example.com/api/v4/snippets/1