Domain name for API request: cwp.tencentcloudapi.com.
This API is used to enable or disable website anti-tampering protection.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: ModifyWebPageProtectSwitch. |
Version | Yes | String | Common Params. The value used for this API: 2018-02-28. |
Region | No | String | Common Params. This parameter is not required. |
SwitchType | Yes | Integer | Switch type: 1 - protection switch; 2 - auto recovery switch; 3 - remove protection directory |
Ids.N | Yes | Array of String | Sites that require operating switches (maximum quantity is 100) |
Status | No | Integer | 1 - on; 0 - off; required when SwitchType is 1 | 2; |
Parameter Name | Type | Description |
---|---|---|
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: cwp.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyWebPageProtectSwitch
<Common request parameters>
{
"SwitchType": 1,
"Ids": [
"1",
"2",
"3"
],
"Status": 1
}
{
"Response": {
"RequestId": "c741a4fd-776f-499b-85a2-7bc70fd5b995"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
FailedOperation | Operation failed. |
FailedOperation.APIServerFail | Failed to invoke the API service. |
FailedOperation.AgentOffline | The client is offline. |
FailedOperation.LicenseExceeded | Insufficient available licenses, missing 1 license. Purchase a new license. |
InternalError | Internal error |
InvalidParameter | Incorrect parameter. |
InvalidParameter.InvalidFormat | Incorrect parameter format. |
LimitExceeded | The quota limit is exceeded. |
MissingParameter | Missing parameter error. |
OperationDenied | The operation was denied. |
ResourceNotFound | The resource does not exist. |
本页内容是否解决了您的问题?