百度智能云

All Product Document

          CDN

          Query Whether the Domain Name can be Added

          Method Path Description
          GET /v2/domain/{domain}/valid Query whether the domain name can be added

          domain: domain name being queried.

          Response body

          Parameter Optional Type Description
          isValid Required Boolean true means you can add the domain name, and false means you cannot add the domain name.
          message Optional String Describe the situation, and if cannot be added, explain the cause

          Request example

          GET /v2/domain/abc.test.com/valid HTTP/1.1 
          Host: cdn.baidubce.com 

          Response example

          • You can add domain names.

              HTTP/1.1 200 OK 
              Server: nginx 
              Date: Thu, 18 Apr 2019 04:23:26 GMT 
              Content-Type: application/json; charset=utf-8 
              Transfer-Encoding: chunked 
              Connection: keep-alive 
              X-Powered-By: PHP/7.1.5 
              x-bce-request-id: ca0aaebb-110e-0ecd-8bf2-3b899cd67f3b
            
              { 
                  "isValid":true, 
                  "message":"the domain is valid" 
              } 
          • You cannot add a domain name.

              HTTP/1.1 200 OK 
              Server: nginx 
              Date: Thu, 18 Apr 2019 04:23:26 GMT 
              Content-Type: application/json; charset=utf-8 
              Transfer-Encoding: chunked 
              Connection: keep-alive 
              X-Powered-By: PHP/7.1.5 
              x-bce-request-id: ca0aaebb-110e-0ecd-8bf2-3b899cd67f3b
            
              { 
                  "isValid": false, 
                  "message": "the domain already exists" 
              }
          Previous
          Delete the Acceleration Domain Name Interface
          Next
          Stop the Acceleration Domain Name Interface