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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # Managed Licenses API > 原文:[https://docs.gitlab.com/ee/api/managed_licenses.html](https://docs.gitlab.com/ee/api/managed_licenses.html) * [List managed licenses](#list-managed-licenses) * [Show an existing managed license](#show-an-existing-managed-license) * [Create a new managed license](#create-a-new-managed-license) * [Delete a managed license](#delete-a-managed-license) * [Edit an existing managed license](#edit-an-existing-managed-license) # Managed Licenses API[](#managed-licenses-api-ultimate "Permalink") ## List managed licenses[](#list-managed-licenses "Permalink") 獲取給定項目的所有托管許可證. ``` GET /projects/:id/managed_licenses ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses" ``` 響應示例: ``` [ { "id": 1, "name": "MIT", "approval_status": "approved" }, { "id": 3, "name": "ISC", "approval_status": "blacklisted" } ] ``` ## Show an existing managed license[](#show-an-existing-managed-license "Permalink") 顯示現有的托管許可證. ``` GET /projects/:id/managed_licenses/:managed_license_id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `managed_license_id` | integer/string | yes | 屬于項目的許可證的 ID 或 URL 編碼名稱 | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/6" ``` 響應示例: ``` { "id": 1, "name": "MIT", "approval_status": "blacklisted" } ``` ## Create a new managed license[](#create-a-new-managed-license "Permalink") 使用給定的名稱和批準狀態為給定的項目創建一個新的托管許可證. ``` POST /projects/:id/managed_licenses ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `name` | string | yes | 托管許可證的名稱 | | `approval_status` | string | yes | 批準狀態. "批準"或"列入黑名單" | ``` curl --data "name=MIT&approval_status=blacklisted" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses" ``` 響應示例: ``` { "id": 1, "name": "MIT", "approval_status": "approved" } ``` ## Delete a managed license[](#delete-a-managed-license "Permalink") 刪除具有給定 ID 的托管許可證. ``` DELETE /projects/:id/managed_licenses/:managed_license_id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `managed_license_id` | integer/string | yes | 屬于項目的許可證的 ID 或 URL 編碼名稱 | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/4" ``` 成功后,它將以 HTTP 204 響應進行回復. ## Edit an existing managed license[](#edit-an-existing-managed-license "Permalink") 使用新的批準狀態更新現有的托管許可證. ``` PATCH /projects/:id/managed_licenses/:managed_license_id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `managed_license_id` | integer/string | yes | 屬于項目的許可證的 ID 或 URL 編碼名稱 | | `approval_status` | string | yes | 批準狀態. "批準"或"列入黑名單" | ``` curl --request PATCH --data "approval_status=blacklisted" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/6" ``` 響應示例: ``` { "id": 1, "name": "MIT", "approval_status": "blacklisted" } ```
                  <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>

                              哎呀哎呀视频在线观看