Update Website
Update an existing website identified by ID.
Request
Request-Line
PUT /waap/v1.0/website/{id} HTTP/1.1
Request Parameters
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| origins | String[] | Mandatory | List of origin URLs (1–5). Each must begin with http:// or https://. |
| http2 | Boolean | Optional | Whether to enable HTTP/2. If not provided, the existing setting will remain unchanged. |
| redirectHttpToHttps | Boolean | Optional | Whether to force HTTP to redirect to HTTPS. If not provided, the existing setting will remain unchanged. |
| headers | Object | Mandatory | Configure the HTTP header to add or replace the headers in requests before forwarding to servers. |
| 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. When omitted, the existing alternativeDomainNames will remain unchanged. |
| ccProtectionRuleId | Integer | Optional | Unique identifier assigned to the CC Protection Rule. |
Response
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 | Id.Invalid | Id is empty or invalid. |
| 400 | Headers.Invalid | Headers is empty or invalid. |
| 403 | WebsiteCount.Exceed | Website quota exceeded. |
| 403 | MultiDomainsCount.Exceed | Multi-domain quota exceeded. |
| 404 | Website.NotFound | Website is not found. |
Examples
Update Website
Request
PUT /waap/v1.0/website/110 HTTP/1.1
{
"origins": ["https://192.168.0.1", "https://origin2.example.com"],
"http2": true,
"redirectHttpToHttps": true,
"headers":{"Host":"$http_host","test1":"111"}
}