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
Tatuya Kamada
gitlab-ce
Commits
78aadc93
Commit
78aadc93
authored
May 03, 2015
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add snippet visibilty as parameter to API doc, closes #1562
parent
76f7bdcc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
doc/api/project_snippets.md
doc/api/project_snippets.md
+15
-0
No files found.
doc/api/project_snippets.md
View file @
78aadc93
# Project snippets
# Project snippets
### Snippet visibility level
Snippets in GitLab can be either private, internal or public.
You can set it with the
`visibility_level`
field in the snippet.
Constants for snippet visibility levels are:
| Visibility | visibility_level | Description |
| ---------- | ---------------- | ----------- |
| Private |
`0`
| The snippet is visible only the snippet creator |
| Internal |
`10`
| The snippet is visible for any logged in user |
| Public |
`20`
| The snippet can be accessed without any authentication |
## List snippets
## List snippets
Get a list of project snippets.
Get a list of project snippets.
...
@@ -58,6 +71,7 @@ Parameters:
...
@@ -58,6 +71,7 @@ Parameters:
-
`title`
(required) - The title of a snippet
-
`title`
(required) - The title of a snippet
-
`file_name`
(required) - The name of a snippet file
-
`file_name`
(required) - The name of a snippet file
-
`code`
(required) - The content of a snippet
-
`code`
(required) - The content of a snippet
-
`visibility_level`
(required) - The snippet's visibility
## Update snippet
## Update snippet
...
@@ -74,6 +88,7 @@ Parameters:
...
@@ -74,6 +88,7 @@ Parameters:
-
`title`
(optional) - The title of a snippet
-
`title`
(optional) - The title of a snippet
-
`file_name`
(optional) - The name of a snippet file
-
`file_name`
(optional) - The name of a snippet file
-
`code`
(optional) - The content of a snippet
-
`code`
(optional) - The content of a snippet
-
`visibility_level`
(optional) - The snippet's visibility
## Delete snippet
## Delete snippet
...
...
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