summaryrefslogtreecommitdiff
path: root/doc/api/wikis.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/wikis.md')
-rw-r--r--doc/api/wikis.md15
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/api/wikis.md b/doc/api/wikis.md
index 569708cdfcc..d6cc6f938b8 100644
--- a/doc/api/wikis.md
+++ b/doc/api/wikis.md
@@ -64,7 +64,7 @@ GET /projects/:id/wikis/:slug
| Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
-| `slug` | string | yes | The slug (a unique string) of the wiki page |
+| `slug` | string | yes | URLencoded slug (a unique string) of the wiki page, such as `dir%2Fpage_name` |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis/home"
@@ -97,7 +97,8 @@ POST /projects/:id/wikis
| `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" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis"
+curl --data "format=rdoc&title=Hello&content=Hello world" \
+ --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis"
```
Example response:
@@ -125,10 +126,11 @@ PUT /projects/:id/wikis/:slug
| `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 | The slug (a unique string) of the wiki page |
+| `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" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis/foo"
+curl --request PUT --data "format=rdoc&content=documentation&title=Docs" \
+ --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis/foo"
```
Example response:
@@ -153,7 +155,7 @@ DELETE /projects/:id/wikis/:slug
| Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
-| `slug` | string | yes | The slug (a unique string) of the wiki page |
+| `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"
@@ -182,7 +184,8 @@ The `file=` parameter must point to a file on your file system and be preceded
by `@`. For example:
```shell
-curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "file=@dk.png" "https://gitlab.example.com/api/v4/projects/1/wikis/attachments"
+curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
+ --form "file=@dk.png" "https://gitlab.example.com/api/v4/projects/1/wikis/attachments"
```
Example response: