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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # Freeze Periods API > 原文:[https://docs.gitlab.com/ee/api/freeze_periods.html](https://docs.gitlab.com/ee/api/freeze_periods.html) * [Permissions and security](#permissions-and-security) * [List Freeze Periods](#list-freeze-periods) * [Get a Freeze Period by a `freeze_period_id`](#get-a-freeze-period-by-a-freeze_period_id) * [Create a Freeze Period](#create-a-freeze-period) * [Update a Freeze Period](#update-a-freeze-period) * [Delete a Freeze Period](#delete-a-freeze-period) # Freeze Periods API[](#freeze-periods-api "Permalink") 在 GitLab 13.0 中[引入](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29382) . 您可以使用 Freeze Periods API 來操縱 GitLab 的[Freeze Period](../user/project/releases/index.html#prevent-unintentional-releases-by-setting-a-deploy-freeze)條目. ## Permissions and security[](#permissions-and-security "Permalink") 只有具有維護者[權限的](../user/permissions.html)用戶才能與 Freeze Period API 端點進行交互. ## List Freeze Periods[](#list-freeze-periods "Permalink") 凍結期間的分頁列表,按`created_at`升序排序. ``` GET /projects/:id/freeze_periods ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) . | 請求示例: ``` curl --header "PRIVATE-TOKEN: gVWYVHDRzXiRpN1rUC8T" "https://gitlab.example.com/api/v4/projects/19/freeze_periods" ``` 響應示例: ``` [ { "id":1, "freeze_start":"0 23 * * 5", "freeze_end":"0 8 * * 1", "cron_timezone":"UTC", "created_at":"2020-05-15T17:03:35.702Z", "updated_at":"2020-05-15T17:06:41.566Z" } ] ``` ## Get a Freeze Period by a `freeze_period_id`[](#get-a-freeze-period-by-a-freeze_period_id "Permalink") 獲取給定的`freeze_period_id`的凍結期. ``` GET /projects/:id/freeze_periods/:freeze_period_id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | 整數或字符串 | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) . | | `freeze_period_id` | string | yes | 凍結期的數據庫 ID. | 請求示例: ``` curl --header "PRIVATE-TOKEN: gVWYVHDRzXiRpN1rUC8T" "https://gitlab.example.com/api/v4/projects/19/freeze_periods/1" ``` 響應示例: ``` { "id":1, "freeze_start":"0 23 * * 5", "freeze_end":"0 8 * * 1", "cron_timezone":"UTC", "created_at":"2020-05-15T17:03:35.702Z", "updated_at":"2020-05-15T17:06:41.566Z" } ``` ## Create a Freeze Period[](#create-a-freeze-period "Permalink") 創建凍結期. ``` POST /projects/:id/freeze_periods ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | 整數或字符串 | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) . | | `freeze_start` | string | yes | [Cron](https://crontab.guru/)格式的凍結期開始. | | `freeze_end` | string | yes | [Cron](https://crontab.guru/)格式的凍結期結束. | | `cron_timezone` | string | no | cron 字段的時區,如果未提供,則默認為 UTC. | 請求示例: ``` curl --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: gVWYVHDRzXiRpN1rUC8T" \ --data '{ "freeze_start": "0 23 * * 5", "freeze_end": "0 7 * * 1", "cron_timezone": "UTC" }' \ --request POST https://gitlab.example.com/api/v4/projects/19/freeze_periods ``` 響應示例: ``` { "id":1, "freeze_start":"0 23 * * 5", "freeze_end":"0 7 * * 1", "cron_timezone":"UTC", "created_at":"2020-05-15T17:03:35.702Z", "updated_at":"2020-05-15T17:03:35.702Z" } ``` ## Update a Freeze Period[](#update-a-freeze-period "Permalink") 為給定的`freeze_period_id`更新凍結期. ``` PUT /projects/:id/freeze_periods/:tag_name ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | 整數或字符串 | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) . | | `freeze_period_id` | 整數或字符串 | yes | 凍結期的數據庫 ID. | | `freeze_start` | string | no | [Cron](https://crontab.guru/)格式的凍結期開始. | | `freeze_end` | string | no | [Cron](https://crontab.guru/)格式的凍結期結束. | | `cron_timezone` | string | no | cron 字段的時區. | 請求示例: ``` curl --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: gVWYVHDRzXiRpN1rUC8T" \ --data '{ "freeze_end": "0 8 * * 1" }' \ --request PUT https://gitlab.example.com/api/v4/projects/19/freeze_periods/1 ``` 響應示例: ``` { "id":1, "freeze_start":"0 23 * * 5", "freeze_end":"0 8 * * 1", "cron_timezone":"UTC", "created_at":"2020-05-15T17:03:35.702Z", "updated_at":"2020-05-15T17:06:41.566Z" } ``` ## Delete a Freeze Period[](#delete-a-freeze-period "Permalink") 刪除給定的`freeze_period_id`的凍結期. ``` DELETE /projects/:id/freeze_periods/:freeze_period_id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | 整數或字符串 | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) . | | `freeze_period_id` | string | yes | 凍結期的數據庫 ID. | 請求示例: ``` curl --request DELETE --header "PRIVATE-TOKEN: gVWYVHDRzXiRpN1rUC8T" "https://gitlab.example.com/api/v4/projects/19/freeze_periods/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>

                              哎呀哎呀视频在线观看