Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/project_snippets.md')
-rw-r--r--doc/api/project_snippets.md44
1 files changed, 27 insertions, 17 deletions
diff --git a/doc/api/project_snippets.md b/doc/api/project_snippets.md
index 0ac2297e3c1..569270e5de1 100644
--- a/doc/api/project_snippets.md
+++ b/doc/api/project_snippets.md
@@ -36,7 +36,9 @@ GET /projects/:id/snippets
Parameters:
-- `id` (required) - The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user
+| Attribute | Type | Required | Description |
+|-----------|----------------|----------|-----------------------------------------------------------------------------------------------------------------|
+| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
## Single snippet
@@ -48,8 +50,10 @@ GET /projects/:id/snippets/:snippet_id
Parameters:
-- `id` (required) - The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user
-- `snippet_id` (required) - The ID of a project's snippet
+| Attribute | Type | Required | Description |
+|--------------|----------------|----------|-----------------------------------------------------------------------------------------------------------------|
+| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
+| `snippet_id` | integer | yes | The ID of a project's snippet |
```json
{
@@ -85,7 +89,7 @@ Parameters:
| Attribute | Type | Required | Description |
|:------------------|:----------------|:---------|:----------------------------------------------------------------------------------------------------------------|
-| `id` | integer | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
+| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
| `title` | string | yes | Title of a snippet |
| `file_name` | string | no | Deprecated: Use `files` instead. Name of a snippet file |
| `content` | string | no | Deprecated: Use `files` instead. Content of a snippet |
@@ -132,7 +136,7 @@ Parameters:
| Attribute | Type | Required | Description |
|:----------------------|:----------------|:---------|:----------------------------------------------------------------------------------------------------------------|
-| `id` | integer | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
+| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
| `snippet_id` | integer | yes | The ID of a project's snippet |
| `title` | string | no | Title of a snippet |
| `file_name` | string | no | Deprecated: Use `files` instead. Name of a snippet file |
@@ -183,8 +187,10 @@ DELETE /projects/:id/snippets/:snippet_id
Parameters:
-- `id` (required) - The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user
-- `snippet_id` (required) - The ID of a project's snippet
+| Attribute | Type | Required | Description |
+|:-------------|:---------------|:---------|:----------------------------------------------------------------------------------------------------------------|
+| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
+| `snippet_id` | integer | yes | The ID of a project's snippet |
Example request:
@@ -203,8 +209,10 @@ GET /projects/:id/snippets/:snippet_id/raw
Parameters:
-- `id` (required) - The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user
-- `snippet_id` (required) - The ID of a project's snippet
+| Attribute | Type | Required | Description |
+|:-------------|:---------------|:---------|:----------------------------------------------------------------------------------------------------------------|
+| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
+| `snippet_id` | integer | yes | The ID of a project's snippet |
Example request:
@@ -223,10 +231,12 @@ GET /projects/:id/snippets/:snippet_id/files/:ref/:file_path/raw
Parameters:
-- `id` (required) - The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user
-- `snippet_id` (required) - The ID of a project's snippet
-- `ref` (required) - The name of a branch, tag or commit, such as `main`
-- `file_path` (required) - The URL-encoded path to the file, such as `snippet%2Erb`
+| Attribute | Type | Required | Description |
+|:-------------|:---------------|:---------|:----------------------------------------------------------------------------------------------------------------|
+| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
+| `snippet_id` | integer | yes | The ID of a project's snippet |
+| `ref` | string | yes | The name of a branch, tag or commit e.g. master |
+| `file_path` | string | yes | The URL-encoded path to the file, e.g. snippet%2Erb |
Example request:
@@ -245,10 +255,10 @@ Available only for users with the Administrator [role](../user/permissions.md).
GET /projects/:id/snippets/:snippet_id/user_agent_detail
```
-| Attribute | Type | Required | Description |
-|---------------|---------|----------|--------------------------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
-| `snippet_id` | Integer | yes | The ID of a snippet |
+| Attribute | Type | Required | Description |
+|--------------|----------------|----------|-----------------------------------------------------------------------------------------------------------------|
+| `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
+| `snippet_id` | Integer | yes | The ID of a snippet |
Example request: