Skip to main content

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

ParameterTypeRequiredDescription
originsString[]MandatoryList of origin URLs (1–5). Each must begin with http:// or https://.
http2BooleanOptionalWhether to enable HTTP/2. If not provided, the existing setting will remain unchanged.
redirectHttpToHttpsBooleanOptionalWhether to force HTTP to redirect to HTTPS. If not provided, the existing setting will remain unchanged.
headersObjectMandatoryConfigure the HTTP header to add or replace the headers in requests before forwarding to servers.
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. When omitted, the existing alternativeDomainNames will remain unchanged.
ccProtectionRuleIdIntegerOptionalUnique identifier assigned to the CC Protection Rule.

Response

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Request.BadRequestBad request.
400Origins.InvalidOrigins is empty or invalid.
400Id.InvalidId is empty or invalid.
400Headers.InvalidHeaders is empty or invalid.
403WebsiteCount.ExceedWebsite quota exceeded.
403MultiDomainsCount.ExceedMulti-domain quota exceeded.
404Website.NotFoundWebsite 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"}
}