<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國際加速解決方案。 廣告
                # Pages domains API > 原文:[https://docs.gitlab.com/ee/api/pages_domains.html](https://docs.gitlab.com/ee/api/pages_domains.html) * [List all pages domains](#list-all-pages-domains) * [List pages domains](#list-pages-domains) * [Single pages domain](#single-pages-domain) * [Create new pages domain](#create-new-pages-domain) * [Update pages domain](#update-pages-domain) * [Adding certificate](#adding-certificate) * [Enabling Let’s Encrypt integration for Pages custom domains](#enabling-lets-encrypt-integration-for-pages-custom-domains) * [Removing certificate](#removing-certificate) * [Delete pages domain](#delete-pages-domain) # Pages domains API[](#pages-domains-api "Permalink") 在[GitLab Pages 中](https://about.gitlab.com/stages-devops-lifecycle/pages/)連接自定義域和 TLS 證書的端點. 必須啟用 GitLab 頁面功能才能使用這些端點. 了解有關[管理](../administration/pages/index.html)和[使用](../user/project/pages/index.html)功能的更多信息. ## List all pages domains[](#list-all-pages-domains "Permalink") 獲取所有頁面域的列表. 用戶必須具有管理員權限. ``` GET /pages/domains ``` ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/pages/domains" ``` ``` [ { "domain": "ssl.domain.example", "url": "https://ssl.domain.example", "project_id": 1337, "auto_ssl_enabled": false, "certificate": { "expired": false, "expiration": "2020-04-12T14:32:00.000Z" } } ] ``` ## List pages domains[](#list-pages-domains "Permalink") Get a list of project pages domains. The user must have permissions to view pages domains. ``` GET /projects/:id/pages/domains ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/pages/domains" ``` ``` [ { "domain": "www.domain.example", "url": "http://www.domain.example" }, { "domain": "ssl.domain.example", "url": "https://ssl.domain.example", "auto_ssl_enabled": false, "certificate": { "subject": "/O=Example, Inc./OU=Example Origin CA/CN=Example Origin Certificate", "expired": false, "certificate": "-----BEGIN CERTIFICATE-----\n … \n-----END CERTIFICATE-----", "certificate_text": "Certificate:\n … \n" } } ] ``` ## Single pages domain[](#single-pages-domain "Permalink") 獲取單個項目頁面域. 用戶必須具有查看頁面域的權限. ``` GET /projects/:id/pages/domains/:domain ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `domain` | string | yes | 用戶指定的自定義域 | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/pages/domains/www.domain.example" ``` ``` { "domain": "www.domain.example", "url": "http://www.domain.example" } ``` ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example" ``` ``` { "domain": "ssl.domain.example", "url": "https://ssl.domain.example", "auto_ssl_enabled": false, "certificate": { "subject": "/O=Example, Inc./OU=Example Origin CA/CN=Example Origin Certificate", "expired": false, "certificate": "-----BEGIN CERTIFICATE-----\n … \n-----END CERTIFICATE-----", "certificate_text": "Certificate:\n … \n" } } ``` ## Create new pages domain[](#create-new-pages-domain "Permalink") 創建一個新的頁面域. 用戶必須具有創建新頁面域的權限. ``` POST /projects/:id/pages/domains ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `domain` | string | yes | 用戶指定的自定義域 | | `auto_ssl_enabled` | boolean | no | 啟用[自動生成](../user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.html)由 Let's Encrypt 為自定義域頒發的 SSL 證書的功能. | | `certificate` | file/string | no | PEM 格式的證書,其中的中間體按照從最高到最低的順序排列. | | `key` | file/string | no | PEM 格式的證書密鑰. | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "domain=ssl.domain.example" --form "certificate=@/path/to/cert.pem" --form "key=@/path/to/key.pem" "https://gitlab.example.com/api/v4/projects/5/pages/domains" ``` ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "domain=ssl.domain.example" --form "certificate=$CERT_PEM" --form "key=$KEY_PEM" "https://gitlab.example.com/api/v4/projects/5/pages/domains" ``` ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "domain=ssl.domain.example" --form "auto_ssl_enabled=true" "https://gitlab.example.com/api/v4/projects/5/pages/domains" ``` ``` { "domain": "ssl.domain.example", "url": "https://ssl.domain.example", "auto_ssl_enabled": true, "certificate": { "subject": "/O=Example, Inc./OU=Example Origin CA/CN=Example Origin Certificate", "expired": false, "certificate": "-----BEGIN CERTIFICATE-----\n … \n-----END CERTIFICATE-----", "certificate_text": "Certificate:\n … \n" } } ``` ## Update pages domain[](#update-pages-domain "Permalink") 更新現有的項目頁面域. 用戶必須具有更改現有頁面域的權限. ``` PUT /projects/:id/pages/domains/:domain ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `domain` | string | yes | 用戶指定的自定義域 | | `auto_ssl_enabled` | boolean | no | 啟用[自動生成](../user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.html)由 Let's Encrypt 為自定義域頒發的 SSL 證書的功能. | | `certificate` | file/string | no | PEM 格式的證書,其中的中間體按照從最高到最低的順序排列. | | `key` | file/string | no | PEM 格式的證書密鑰. | ### Adding certificate[](#adding-certificate "Permalink") ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form "certificate=@/path/to/cert.pem" --form "key=@/path/to/key.pem" "https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example" ``` ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form "certificate=$CERT_PEM" --form "key=$KEY_PEM" "https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example" ``` ``` { "domain": "ssl.domain.example", "url": "https://ssl.domain.example", "auto_ssl_enabled": false, "certificate": { "subject": "/O=Example, Inc./OU=Example Origin CA/CN=Example Origin Certificate", "expired": false, "certificate": "-----BEGIN CERTIFICATE-----\n … \n-----END CERTIFICATE-----", "certificate_text": "Certificate:\n … \n" } } ``` ### Enabling Let’s Encrypt integration for Pages custom domains[](#enabling-lets-encrypt-integration-for-pages-custom-domains "Permalink") ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form "auto_ssl_enabled=true" "https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example" ``` ``` { "domain": "ssl.domain.example", "url": "https://ssl.domain.example", "auto_ssl_enabled": true } ``` ### Removing certificate[](#removing-certificate "Permalink") 要刪除附加到 Pages 域的 SSL 證書,請運行: ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form "certificate=" --form "key=" "https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example" ``` ``` { "domain": "ssl.domain.example", "url": "https://ssl.domain.example", "auto_ssl_enabled": false } ``` ## Delete pages domain[](#delete-pages-domain "Permalink") 刪除現有的項目頁面域. ``` DELETE /projects/:id/pages/domains/:domain ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `domain` | string | yes | 用戶指定的自定義域 | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example" ```
                  <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>

                              哎呀哎呀视频在线观看