<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 功能強大 支持多語言、二開方便! 廣告
                # Group-level Variables API > 原文:[https://docs.gitlab.com/ee/api/group_level_variables.html](https://docs.gitlab.com/ee/api/group_level_variables.html) * [List group variables](#list-group-variables) * [Show variable details](#show-variable-details) * [Create variable](#create-variable) * [Update variable](#update-variable) * [Remove variable](#remove-variable) # Group-level Variables API[](#group-level-variables-api "Permalink") 在 GitLab 9.5 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/34519) ## List group variables[](#list-group-variables "Permalink") 獲取組變量的列表. ``` GET /groups/:id/variables ``` | 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/groups/1/variables" ``` ``` [ { "key": "TEST_VARIABLE_1", "variable_type": "env_var", "value": "TEST_1", "protected": false, "masked": false }, { "key": "TEST_VARIABLE_2", "variable_type": "env_var", "value": "TEST_2", "protected": false, "masked": false } ] ``` ## Show variable details[](#show-variable-details "Permalink") 獲取組特定變量的詳細信息. ``` GET /groups/:id/variables/:key ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有的組的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `key` | string | yes | 變量的`key` | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/TEST_VARIABLE_1" ``` ``` { "key": "TEST_VARIABLE_1", "variable_type": "env_var", "value": "TEST_1", "protected": false, "masked": false } ``` ## Create variable[](#create-variable "Permalink") 創建一個新變量. ``` POST /groups/:id/variables ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有的組的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `key` | string | yes | 變量的`key` ; 不得超過 255 個字符; 僅允許`AZ` , `az` , `0-9`和`_` | | `value` | string | yes | 變量的`value` | | `variable_type` | string | no | 變量的類型. 可用類型為: `env_var` (默認)和`file` | | `protected` | boolean | no | 變量是否受保護 | | `masked` | boolean | no | 變量是否被屏蔽 | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables" --form "key=NEW_VARIABLE" --form "value=new value" ``` ``` { "key": "NEW_VARIABLE", "value": "new value", "variable_type": "env_var", "protected": false, "masked": false } ``` ## Update variable[](#update-variable "Permalink") 更新組的變量. ``` PUT /groups/:id/variables/:key ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有的組的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `key` | string | yes | 變量的`key` | | `value` | string | yes | 變量的`value` | | `variable_type` | string | no | 變量的類型. 可用類型為: `env_var` (默認)和`file` | | `protected` | boolean | no | 變量是否受保護 | | `masked` | boolean | no | 變量是否被屏蔽 | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/NEW_VARIABLE" --form "value=updated value" ``` ``` { "key": "NEW_VARIABLE", "value": "updated value", "variable_type": "env_var", "protected": true, "masked": true } ``` ## Remove variable[](#remove-variable "Permalink") 刪除組的變量. ``` DELETE /groups/:id/variables/:key ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有的組的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `key` | string | yes | 變量的`key` | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/VARIABLE_1" ```
                  <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>

                              哎呀哎呀视频在线观看