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/wikis.md')
-rw-r--r--doc/api/wikis.md66
1 files changed, 33 insertions, 33 deletions
diff --git a/doc/api/wikis.md b/doc/api/wikis.md
index c33d66a14e4..0b61d92177f 100644
--- a/doc/api/wikis.md
+++ b/doc/api/wikis.md
@@ -21,10 +21,10 @@ Get all wiki pages for a given project.
GET /projects/:id/wikis
```
-| Attribute | Type | Required | Description |
-| --------- | ------- | -------- | --------------------- |
-| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) |
-| `with_content` | boolean | no | Include pages' content |
+| Attribute | Type | Required | Description |
+| -------------- | -------------- | -------- | ----------- |
+| `id` | integer/string | Yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
+| `with_content` | boolean | No | Include pages' content. |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis?with_content=1"
@@ -65,12 +65,12 @@ Get a wiki page for a given project.
GET /projects/:id/wikis/:slug
```
-| Attribute | Type | Required | Description |
-| --------- | ------- | -------- | --------------------- |
-| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) |
-| `slug` | string | yes | URL encoded slug (a unique string) of the wiki page, such as `dir%2Fpage_name` |
-| `render_html` | boolean | no | Return the rendered HTML of the wiki page |
-| `version` | string | no | Wiki page version SHA |
+| Attribute | Type | Required | Description |
+| ------------- | -------------- | -------- | ----------- |
+| `id` | integer/string | Yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
+| `slug` | string | Yes | URL encoded slug (a unique string) of the wiki page, such as `dir%2Fpage_name`. |
+| `render_html` | boolean | No | Return the rendered HTML of the wiki page. |
+| `version` | string | No | Wiki page version SHA. |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis/home"
@@ -96,12 +96,12 @@ Creates a new wiki page for the given repository with the given title, slug, and
POST /projects/:id/wikis
```
-| Attribute | Type | Required | Description |
-| ------------- | ------- | -------- | ---------------------------- |
-| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) |
-| `content` | string | yes | The content of the wiki page |
-| `title` | string | yes | The title of the wiki page |
-| `format` | string | no | The format of the wiki page. Available formats are: `markdown` (default), `rdoc`, `asciidoc` and `org` |
+| Attribute | Type | Required | Description |
+| ----------| -------------- | -------- | ----------- |
+| `id` | integer/string | Yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
+| `content` | string | Yes | The content of the wiki page. |
+| `title` | string | Yes | The title of the wiki page. |
+| `format` | string | No | The format of the wiki page. Available formats are: `markdown` (default), `rdoc`, `asciidoc`, and `org`. |
```shell
curl --data "format=rdoc&title=Hello&content=Hello world" \
@@ -128,13 +128,13 @@ Updates an existing wiki page. At least one parameter is required to update the
PUT /projects/:id/wikis/:slug
```
-| Attribute | Type | Required | Description |
-| --------------- | ------- | --------------------------------- | ------------------------------- |
-| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) |
-| `content` | string | yes if `title` is not provided | The content of the wiki page |
-| `title` | string | yes if `content` is not provided | The title of the wiki page |
-| `format` | string | no | The format of the wiki page. Available formats are: `markdown` (default), `rdoc`, `asciidoc` and `org` |
-| `slug` | string | yes | URL-encoded slug (a unique string) of the wiki page, such as `dir%2Fpage_name` |
+| Attribute | Type | Required | Description |
+| --------- | ------- | --------------------------------- | ----------- |
+| `id` | integer/string | Yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
+| `content` | string | Yes, if `title` is not provided | The content of the wiki page. |
+| `title` | string | Yes, if `content` is not provided | The title of the wiki page. |
+| `format` | string | No | The format of the wiki page. Available formats are: `markdown` (default), `rdoc`, `asciidoc`, and `org`. |
+| `slug` | string | Yes | URL-encoded slug (a unique string) of the wiki page, such as `dir%2Fpage_name`. |
```shell
curl --request PUT --data "format=rdoc&content=documentation&title=Docs" \
@@ -161,16 +161,16 @@ Deletes a wiki page with a given slug.
DELETE /projects/:id/wikis/:slug
```
-| Attribute | Type | Required | Description |
-| --------- | ------- | -------- | --------------------- |
-| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) |
-| `slug` | string | yes | URL-encoded slug (a unique string) of the wiki page, such as `dir%2Fpage_name` |
+| Attribute | Type | Required | Description |
+| --------- | -------------- | -------- | ----------- |
+| `id` | integer/string | Yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
+| `slug` | string | Yes | URL-encoded slug (a unique string) of the wiki page, such as `dir%2Fpage_name`. |
```shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis/foo"
```
-On success the HTTP status code is `204` and no JSON response is expected.
+If successful, a `204 No Content` HTTP response with an empty body is expected.
## Upload an attachment to the wiki repository
@@ -181,11 +181,11 @@ Uploads a file to the attachment folder inside the wiki's repository. The
POST /projects/:id/wikis/attachments
```
-| Attribute | Type | Required | Description |
-| ------------- | ------- | -------- | ---------------------------- |
-| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) |
-| `file` | string | yes | The attachment to be uploaded |
-| `branch` | string | no | The name of the branch. Defaults to the wiki repository default branch |
+| Attribute | Type | Required | Description |
+| --------- | -------------- | -------- | ----------- |
+| `id` | integer/string | Yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
+| `file` | string | Yes | The attachment to be uploaded. |
+| `branch` | string | No | The name of the branch. Defaults to the wiki repository default branch. |
To upload a file from your file system, use the `--form` argument. This causes
cURL to post data using the header `Content-Type: multipart/form-data`.