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
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Mandatory | Fully qualified domain name starting with a letter, containing letters, digits, hyphens, or underscores, with a 2–20 letter top-level domain. |
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. |
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. |
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://origin2.example.com"],
"http2": true,
"redirectHttpToHttps": true
}
Successful Response Body
{
"id": 400,
"service_id": 227995,
"domain": "test.com"
}