summaryrefslogtreecommitdiff
path: root/doc/api/snippets.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-12 16:26:10 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-12 16:26:10 +0000
commit6653ccc011dec86e5140a5d09ea3b2357eab6714 (patch)
tree897193f37bcd98152a0ac214f80a3c4cfe1047c5 /doc/api/snippets.md
parentbff35a05aed6a31380a73c39113808fd262c2c37 (diff)
downloadgitlab-ce-6653ccc011dec86e5140a5d09ea3b2357eab6714.tar.gz
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc41
Diffstat (limited to 'doc/api/snippets.md')
-rw-r--r--doc/api/snippets.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/api/snippets.md b/doc/api/snippets.md
index 670045df66d..cf1cfa567db 100644
--- a/doc/api/snippets.md
+++ b/doc/api/snippets.md
@@ -5,11 +5,13 @@ info: "To determine the technical writer assigned to the Stage/Group associated
type: reference, api
---
-# Snippets API
+# Snippets API **(FREE)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6373) in GitLab 8.15.
-Snippets API operates on [snippets](../user/snippets.md).
+Snippets API operates on [snippets](../user/snippets.md). Related APIs exist for
+[project snippets](project_snippets.md) and
+[moving snippets between storages](snippet_repository_storage_moves.md).
## Snippet visibility level
@@ -230,7 +232,7 @@ curl --request POST "https://gitlab.example.com/api/v4/snippets" \
"content": "Hello world",
"file_path": "test.txt"
}
- ]
+ ]
}
```
@@ -289,14 +291,12 @@ Parameters:
| `content` | string | no | Deprecated: Use `files` instead. Content of a snippet |
| `description` | string | no | Description of a snippet |
| `visibility` | string | no | Snippet's [visibility](#snippet-visibility-level) |
-| `files` | array of hashes | no | An array of snippet files |
+| `files` | array of hashes | sometimes | An array of snippet files. Required when updating snippets with multiple files. |
| `files:action` | string | yes | Type of action to perform on the file, one of: 'create', 'update', 'delete', 'move' |
| `files:file_path` | string | no | File path of the snippet file |
| `files:previous_path` | string | no | Previous path of the snippet file |
| `files:content` | string | no | Content of the snippet file |
-Updates to snippets with multiple files *must* use the `files` attribute.
-
Example request:
```shell