Commit 14bc5293 authored by Amy Qualls's avatar Amy Qualls

Minor revisions to Snippets API page

Small changes to the Snippets API page - better cross-linking between
various API pages, and moving a definition note closer to the item
it describes.
parent 40f9d22d
...@@ -9,7 +9,9 @@ type: reference, api ...@@ -9,7 +9,9 @@ type: reference, api
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6373) in GitLab 8.15. > [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 ## Snippet visibility level
...@@ -289,14 +291,12 @@ Parameters: ...@@ -289,14 +291,12 @@ Parameters:
| `content` | string | no | Deprecated: Use `files` instead. Content of a snippet | | `content` | string | no | Deprecated: Use `files` instead. Content of a snippet |
| `description` | string | no | Description of a snippet | | `description` | string | no | Description of a snippet |
| `visibility` | string | no | Snippet's [visibility](#snippet-visibility-level) | | `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: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:file_path` | string | no | File path of the snippet file |
| `files:previous_path` | string | no | Previous 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 | | `files:content` | string | no | Content of the snippet file |
Updates to snippets with multiple files *must* use the `files` attribute.
Example request: Example request:
```shell ```shell
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment