summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorSascha Szott <sascha.szott@bam.de>2018-01-11 08:04:50 +0000
committerSascha Szott <sascha.szott@bam.de>2018-01-11 08:04:50 +0000
commit3545ceb02c08b71422b51209a2cca21155236cfc (patch)
treefe33cddab8fd70cf07d055e3c2ca39cd57e010a0 /doc/api
parentc90fcf1a29bd37ab2122bd8c03668cff79c29aa3 (diff)
downloadgitlab-ce-3545ceb02c08b71422b51209a2cca21155236cfc.tar.gz
apply documentation changes from EE to CE
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/snippets.md12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/api/snippets.md b/doc/api/snippets.md
index fdafbfb5b9e..e57143e4215 100644
--- a/doc/api/snippets.md
+++ b/doc/api/snippets.md
@@ -84,7 +84,11 @@ Parameters:
``` bash
-curl --request POST --data '{"title": "This is a snippet", "content": "Hello world", "description": "Hello World snippet", "file_name": "test.txt", "visibility": "internal" }' --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/snippets
+curl --request POST \
+ --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
```
Example response:
@@ -131,7 +135,11 @@ Parameters:
``` bash
-curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data '{"title": "foo", "content": "bar"}' https://gitlab.example.com/api/v4/snippets/1
+curl --request PUT \
+ --data '{"title": "foo", "content": "bar"}' \
+ --header 'Content-Type: application/json' \
+ --header "PRIVATE-TOKEN: valid_api_token" \
+ https://gitlab.example.com/api/v4/snippets/1
```
Example response: