Skip to main content

Create Website

Create 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
nameStringMandatoryThe domain name. Valid characters: 0-9, a-z, - (hyphen) and . (period).
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.
alternateDomainNamesString[]OptionalAn array of alternative domain names (up to 20 domains). Duplicates are not allowed. Alternate Domain Name must be the sub-domain of the root domain.
ccProtectionRuleIdIntegerOptionalUnique identifier assigned to the CC Protection Rule.

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.
403WebsiteCount.ExceedWebsite quota exceeded.
403MultiDomainsCount.ExceedMulti-domain quota exceeded.
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://origin.example.com"],
"http2": true,
"redirectHttpToHttps": true,
"alternateDomainNames":[]
}

Successful Response Body

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