diff options
author | Achilleas Pipinellis <axilleas@axilleas.me> | 2015-05-03 14:03:19 +0000 |
---|---|---|
committer | Achilleas Pipinellis <axilleas@axilleas.me> | 2015-05-03 14:03:19 +0000 |
commit | 3f4bbbaf983c59a8e2c348ec9391945a9d33c526 (patch) | |
tree | 5048fd4bc3a7ac23940737fe7efe6a453b43d9fd /doc/api | |
parent | 187b4964259efe6d55a668173ee3ed32d79657c3 (diff) | |
parent | 78aadc933627c1e990fb00666ade07d18d4caf11 (diff) | |
download | gitlab-ce-3f4bbbaf983c59a8e2c348ec9391945a9d33c526.tar.gz |
Merge branch 'fix_snippet_api_doc' into 'master'
Add snippet visibilty as parameter to API doc, closes #1562
## Description
Snippet visibility level was added to API but was not to its documentation.
Related to following commit: 928fc94c3d900069902b097d6464acee712a886c
@axil Can you review?
See merge request !601
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/project_snippets.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/api/project_snippets.md b/doc/api/project_snippets.md index 50e134847c0..a7acf37b5bc 100644 --- a/doc/api/project_snippets.md +++ b/doc/api/project_snippets.md @@ -1,5 +1,18 @@ # 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 Get a list of project snippets. @@ -58,6 +71,7 @@ Parameters: - `title` (required) - The title of a snippet - `file_name` (required) - The name of a snippet file - `code` (required) - The content of a snippet +- `visibility_level` (required) - The snippet's visibility ## Update snippet @@ -74,6 +88,7 @@ Parameters: - `title` (optional) - The title of a snippet - `file_name` (optional) - The name of a snippet file - `code` (optional) - The content of a snippet +- `visibility_level` (optional) - The snippet's visibility ## Delete snippet |