Skip to main content

Create Website

Creates a new website including its CDN and SCDN configurations.

Request

Request-Line

POST /waap/v1.0/website HTTP/1.1

Request Parameters

Body Parameters

ParameterTypeRequiredDescription
namestringMandatoryFully qualified domain name starting with a letter, containing letters, digits, hyphens, or underscores, with a 2–20 letter top-level domain.
originsstring[]MandatoryList of origin URLs (1–5). Each must begin with http:// or https://.
http2booleanOptionalWhether to enable HTTP/2. Default is false if omitted.
redirectHttpToHttpsbooleanOptionalWhether to force HTTP to redirect to HTTPS. Default is false if omitted.

Response

Response Body

Property nameTypeRequiredDescription
idintegerMandatoryUnique identifier of the website record.
service_idintegerMandatoryUnique identifier of the CDN service.
domainstringMandatoryDomain name of the website.

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Request.BadRequestBad request.
400Origins.InvalidOrigins is empty or invalid.
400Name.InvalidName is empty or invalid.
409DomainName.ExistDomain name already exists.

Examples

Create Website

Request

POST /waap/v1.0/website HTTP/1.1

{
"name": "test.com",
"origins": ["https://192.168.0.1", "https://origin2.example.com"],
"http2": true,
"redirectHttpToHttps": true
}

Successful Response Body

{
"id": 400,
"service_id": 227995,
"domain": "test.com"
}