Update Website
Updates 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. |
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. |
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"}
}