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
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Mandatory | The domain name. Valid characters: 0-9, a-z, - (hyphen) and . (period). |
| origins | String[] | Mandatory | List of origin URLs (1–5). Each must begin with http:// or https://. |
| http2 | Boolean | Optional | Whether to enable HTTP/2. Default is false if omitted. |
| redirectHttpToHttps | Boolean | Optional | Whether to force HTTP to redirect to HTTPS. Default is false if omitted. |
| alternateDomainNames | String[] | Optional | An 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. |
| ccProtectionRuleId | Integer | Optional | Unique identifier assigned to the CC Protection Rule. |
Response
Response Body
| Property name | Type | Required | Description |
|---|---|---|---|
| id | Integer | Mandatory | Unique identifier of the website record. |
| service_id | Integer | Mandatory | Unique identifier of the CDN service. |
| domain | String | Mandatory | Domain name of the website. |
Status Codes, Error Codes and Error Messages
| Status Code | Error Code | Error Message |
|---|---|---|
| 400 | Request.BadRequest | Bad request. |
| 400 | Origins.Invalid | Origins is empty or invalid. |
| 400 | Name.Invalid | Name is empty or invalid. |
| 403 | WebsiteCount.Exceed | Website quota exceeded. |
| 403 | MultiDomainsCount.Exceed | Multi-domain quota exceeded. |
| 409 | DomainName.Exist | Domain 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"
}