<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Wikis API > 原文:[https://docs.gitlab.com/ee/api/wikis.html](https://docs.gitlab.com/ee/api/wikis.html) * [List wiki pages](#list-wiki-pages) * [Get a wiki page](#get-a-wiki-page) * [Create a new wiki page](#create-a-new-wiki-page) * [Edit an existing wiki page](#edit-an-existing-wiki-page) * [Delete a wiki page](#delete-a-wiki-page) * [Upload an attachment to the wiki repository](#upload-an-attachment-to-the-wiki-repository) # Wikis API[](#wikis-api "Permalink") 在 GitLab 10.0 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/13372) . 僅在 APIv4 中可用. ## List wiki pages[](#list-wiki-pages "Permalink") 獲取給定項目的所有 Wiki 頁面. ``` GET /projects/:id/wikis ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `with_content` | boolean | no | 包含頁面內容 | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis?with_content=1" ``` 響應示例: ``` [ { "content" : "Here is an instruction how to deploy this project.", "format" : "markdown", "slug" : "deploy", "title" : "deploy" }, { "content" : "Our development process is described here.", "format" : "markdown", "slug" : "development", "title" : "development" },{ "content" : "* [Deploy](deploy)\n* [Development](development)", "format" : "markdown", "slug" : "home", "title" : "home" } ] ``` ## Get a wiki page[](#get-a-wiki-page "Permalink") 獲取給定項目的 Wiki 頁面. ``` GET /projects/:id/wikis/:slug ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `slug` | string | yes | Wiki 頁面的段(唯一字符串) | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis/home" ``` 響應示例: ``` { "content" : "home page", "format" : "markdown", "slug" : "home", "title" : "home" } ``` ## Create a new wiki page[](#create-a-new-wiki-page "Permalink") 使用給定的標題,條目和內容為給定的存儲庫創建一個新的 Wiki 頁面. ``` POST /projects/:id/wikis ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `content` | string | yes | Wiki 頁面的內容 | | `title` | string | yes | 維基頁面的標題 | | `format` | string | no | Wiki 頁面的格式. 可用格式為: `markdown` (默認), `rdoc` , `asciidoc`和`org` | ``` curl --data "format=rdoc&title=Hello&content=Hello world" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis" ``` 響應示例: ``` { "content" : "Hello world", "format" : "markdown", "slug" : "Hello", "title" : "Hello" } ``` ## Edit an existing wiki page[](#edit-an-existing-wiki-page "Permalink") 更新現有的 Wiki 頁面. 至少需要一個參數才能更新 Wiki 頁面. ``` PUT /projects/:id/wikis/:slug ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `content` | string | 是,如果未提供`title` | Wiki 頁面的內容 | | `title` | string | 是,如果未提供`content` | 維基頁面的標題 | | `format` | string | no | Wiki 頁面的格式. 可用格式為: `markdown` (默認), `rdoc` , `asciidoc`和`org` | | `slug` | string | yes | Wiki 頁面的段(唯一字符串) | ``` 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" ``` 響應示例: ``` { "content" : "documentation", "format" : "markdown", "slug" : "Docs", "title" : "Docs" } ``` ## Delete a wiki page[](#delete-a-wiki-page "Permalink") 刪除帶有給定子彈的 Wiki 頁面. ``` DELETE /projects/:id/wikis/:slug ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `slug` | string | yes | Wiki 頁面的段(唯一字符串) | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis/foo" ``` 成功時,HTTP 狀態代碼為`204`并且不需要 JSON 響應. ## Upload an attachment to the wiki repository[](#upload-an-attachment-to-the-wiki-repository "Permalink") 將文件上傳到 Wiki 信息庫中的附件文件夾. 附件文件夾是`uploads`文件夾. ``` POST /projects/:id/wikis/attachments ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `file` | string | yes | 要上傳的附件 | | `branch` | string | no | 分支的名稱. 默認為 Wiki 存儲庫默認分支 | 要從文件系統上載文件,請使用`--form`參數. 這將導致 cURL 使用標題`Content-Type: multipart/form-data` . `file=`參數必須指向文件系統上的文件,并以`@`開頭. 例如: ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "file=@dk.png" "https://gitlab.example.com/api/v4/projects/1/wikis/attachments" ``` 響應示例: ``` { "file_name" : "dk.png", "file_path" : "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png", "branch" : "master", "link" : { "url" : "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png", "markdown" : "![dk](uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png)" } } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看