<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Release links API > 原文:[https://docs.gitlab.com/ee/api/releases/links.html](https://docs.gitlab.com/ee/api/releases/links.html) * [Get links](#get-links) * [Get a link](#get-a-link) * [Create a link](#create-a-link) * [Update a link](#update-a-link) * [Delete a link](#delete-a-link) # Release links API[](#release-links-api "Permalink") 在 GitLab 11.7 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/41766) . 使用此 API,您可以操縱 GitLab 的[Release](../../user/project/releases/index.html)鏈接. 有關操縱其他 Release 資產的信息,請參見[Release API](index.html) . GitLab 支持指向`http` , `https`和`ftp`資產的鏈接. ## Get links[](#get-links "Permalink") 從發布中獲取資產作為鏈接. ``` GET /projects/:id/releases/:tag_name/assets/links ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](../README.html#namespaced-path-encoding) . | | `tag_name` | string | yes | 與發行版關聯的標簽. | 請求示例: ``` curl --header "PRIVATE-TOKEN: n671WNGecHugsdEDPsyo" "https://gitlab.example.com/api/v4/projects/24/releases/v0.1/assets/links" ``` 響應示例: ``` [ { "id":2, "name":"awesome-v0.2.msi", "url":"http://192.168.10.15:3000/msi", "external":true, "link_type":"other" }, { "id":1, "name":"awesome-v0.2.dmg", "url":"http://192.168.10.15:3000", "external":true, "link_type":"other" } ] ``` ## Get a link[](#get-a-link "Permalink") 從發布中獲取資產作為鏈接. ``` GET /projects/:id/releases/:tag_name/assets/links/:link_id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](../README.html#namespaced-path-encoding) . | | `tag_name` | string | yes | 與發行版關聯的標簽. | | `link_id` | integer | yes | 鏈接的 ID. | 請求示例: ``` curl --header "PRIVATE-TOKEN: n671WNGecHugsdEDPsyo" "https://gitlab.example.com/api/v4/projects/24/releases/v0.1/assets/links/1" ``` 響應示例: ``` { "id":1, "name":"awesome-v0.2.dmg", "url":"http://192.168.10.15:3000", "external":true, "link_type":"other" } ``` ## Create a link[](#create-a-link "Permalink") 從發布創建資產作為鏈接. ``` POST /projects/:id/releases/:tag_name/assets/links ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](../README.html#namespaced-path-encoding) . | | `tag_name` | string | yes | 與發行版關聯的標簽. | | `name` | string | yes | 鏈接的名稱. | | `url` | string | yes | 鏈接的 URL. | | `link_type` | string | no | 鏈接的類型: `other` , `runbook` , `image` , `package` . 默認為`other` . | 請求示例: ``` curl --request POST \ --header "PRIVATE-TOKEN: n671WNGecHugsdEDPsyo" \ --data name="awesome-v0.2.dmg" \ --data url="http://192.168.10.15:3000" \ "https://gitlab.example.com/api/v4/projects/24/releases/v0.1/assets/links" ``` 響應示例: ``` { "id":1, "name":"awesome-v0.2.dmg", "url":"http://192.168.10.15:3000", "external":true, "link_type":"other" } ``` ## Update a link[](#update-a-link "Permalink") 將資產更新為發布中的鏈接. ``` PUT /projects/:id/releases/:tag_name/assets/links/:link_id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](../README.html#namespaced-path-encoding) . | | `tag_name` | string | yes | 與發行版關聯的標簽. | | `link_id` | integer | yes | 鏈接的 ID. | | `name` | string | no | 鏈接的名稱. | | `url` | string | no | 鏈接的 URL. | | `link_type` | string | no | 鏈接的類型: `other` , `runbook` , `image` , `package` . 默認為`other` . | **注意**您必須至少指定`name`或`url` 請求示例: ``` curl --request PUT --data name="new name" --data link_type="runbook" --header "PRIVATE-TOKEN: n671WNGecHugsdEDPsyo" "https://gitlab.example.com/api/v4/projects/24/releases/v0.1/assets/links/1" ``` 響應示例: ``` { "id":1, "name":"new name", "url":"http://192.168.10.15:3000", "external":true, "link_type":"runbook" } ``` ## Delete a link[](#delete-a-link "Permalink") 從發布中刪除資產作為鏈接. ``` DELETE /projects/:id/releases/:tag_name/assets/links/:link_id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](../README.html#namespaced-path-encoding) . | | `tag_name` | string | yes | 與發行版關聯的標簽. | | `link_id` | integer | yes | 鏈接的 ID. | 請求示例: ``` curl --request DELETE --header "PRIVATE-TOKEN: n671WNGecHugsdEDPsyo" "https://gitlab.example.com/api/v4/projects/24/releases/v0.1/assets/links/1" ``` 響應示例: ``` { "id":1, "name":"new name", "url":"http://192.168.10.15:3000", "external":true, "link_type":"other" } ```
                  <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>

                              哎呀哎呀视频在线观看