<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國際加速解決方案。 廣告
                # License > 原文:[https://docs.gitlab.com/ee/api/license.html](https://docs.gitlab.com/ee/api/license.html) * [Retrieve information about the current license](#retrieve-information-about-the-current-license) * [Retrieve information about all licenses](#retrieve-information-about-all-licenses) * [Add a new license](#add-a-new-license) * [Delete a license](#delete-a-license) # License[](#license-core-only "Permalink") 為了與許可證端點進行交互,您需要以管理員身份進行身份驗證. ## Retrieve information about the current license[](#retrieve-information-about-the-current-license "Permalink") ``` GET /license ``` ``` { "id": 2, "plan": "gold", "created_at": "2018-02-27T23:21:58.674Z", "starts_at": "2018-01-27", "expires_at": "2022-01-27", "historical_max": 300, "maximum_user_count": 300, "expired": false, "overage": 200, "user_limit": 100, "active_users": 300, "licensee": { "Name": "John Doe1" }, "add_ons": { "GitLab_FileLocks": 1, "GitLab_Auditor_User": 1 } } ``` ## Retrieve information about all licenses[](#retrieve-information-about-all-licenses "Permalink") ``` GET /licenses ``` ``` [ { "id": 1, "plan": "silver", "created_at": "2018-02-27T23:21:58.674Z", "starts_at": "2018-01-27", "expires_at": "2022-01-27", "historical_max": 300, "maximum_user_count": 300, "expired": false, "overage": 200, "user_limit": 100, "licensee": { "Name": "John Doe1" }, "add_ons": { "GitLab_FileLocks": 1, "GitLab_Auditor_User": 1 } }, { "id": 2, "plan": "gold", "created_at": "2018-02-27T23:21:58.674Z", "starts_at": "2018-01-27", "expires_at": "2022-01-27", "historical_max": 300, "maximum_user_count": 300, "expired": false, "overage": 200, "user_limit": 100, "licensee": { "Name": "Doe John" }, "add_ons": { "GitLab_FileLocks": 1, } } ] ``` 超出數是活動用戶數與許可用戶數之差. 根據許可證是否已過期,計算方法會有所不同. * 如果許可證已過期,則使用歷史最大活動用戶數( `historical_max` ). * 如果許可證尚未過期,則使用當前活動用戶數. Returns: * `200 OK` ,響應包含 JSON 格式的許可證. 如果沒有許可證,這將是一個空的 JSON 數組. * `403 Forbidden`如果當前用戶不允許閱讀許可證, `403 Forbidden` . ## Add a new license[](#add-a-new-license "Permalink") ``` POST /license ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `license` | string | yes | 許可證字符串 | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/license?license=eyJkYXRhIjoiMHM5Q...S01Udz09XG4ifQ==" ``` 響應示例: ``` { "id": 1, "plan": "gold", "created_at": "2018-02-27T23:21:58.674Z", "starts_at": "2018-01-27", "expires_at": "2022-01-27", "historical_max": 300, "maximum_user_count": 300, "expired": false, "overage": 200, "user_limit": 100, "active_users": 300, "licensee": { "Name": "John Doe1" }, "add_ons": { "GitLab_FileLocks": 1, "GitLab_Auditor_User": 1 } } ``` Returns: * `201 Created`如果成功添加許可證,則`201 Created` . * `400 Bad Request`如果無法添加許可證),并附有一條錯誤消息,說明原因. ## Delete a license[](#delete-a-license "Permalink") ``` DELETE /license/:id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer | yes | GitLab 許可證的 ID. | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/license/:id" ``` 響應示例: ``` { "id": 2, "plan": "gold", "created_at": "2018-02-27T23:21:58.674Z", "starts_at": "2018-01-27", "expires_at": "2022-01-27", "historical_max": 300, "maximum_user_count": 300, "expired": false, "overage": 200, "user_limit": 100, "licensee": { "Name": "John Doe" }, "add_ons": { "GitLab_FileLocks": 1, "GitLab_Auditor_User": 1 } } ``` Returns: * `204 No Content`如果成功刪除了許可證,則`204 No Content` . * `403 Forbidden`如果當前用戶不允許刪除許可證,則禁止. * 如果`404 Not Found`刪除許可證,則`404 Not Found` .
                  <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>

                              哎呀哎呀视频在线观看