Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
5e0378b3
Commit
5e0378b3
authored
Aug 27, 2019
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'nik-api-snippets-fix' into 'master'"
This reverts merge request !28571
parent
a58f4f00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
doc/api/snippets.md
doc/api/snippets.md
+5
-5
No files found.
doc/api/snippets.md
View file @
5e0378b3
...
...
@@ -165,15 +165,15 @@ Parameters:
|:--------------|:-------|:---------|:---------------------------------------------------|
|
`title`
| string | yes | Title of a snippet. |
|
`file_name`
| string | yes | Name of a snippet file. |
|
`co
de
`
| string | yes | Content of a snippet. |
|
`co
ntent
`
| 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", "co
de
": "Hello world", "description": "Hello World snippet", "file_name": "test.txt", "visibility": "internal" }'
\
--data
'{"title": "This is a snippet", "co
ntent
": "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. |
|
`co
de
`
| string | no | Content of a snippet. |
|
`co
ntent
`
| string | no | Content of a snippet. |
|
`visibility`
| string | no | Snippet's
[
visibility
](
#snippet-visibility-level
)
. |
Example request:
```
sh
curl
--request
PUT
\
--data
'{"title": "foo", "co
de
": "bar"}'
\
--data
'{"title": "foo", "co
ntent
": "bar"}'
\
--header
'Content-Type: application/json'
\
--header
"PRIVATE-TOKEN: valid_api_token"
\
https://gitlab.example.com/api/v4/snippets/1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment