tencent cloud

文档反馈

ModifyBotStatus

最后更新时间:2024-09-25 10:13:17

1. API Description

Domain name for API request: waf.tencentcloudapi.com.

Bot_V2 bot master switch update

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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: ModifyBotStatus.
Version Yes String Common Params. The value used for this API: 2018-01-25.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou, ap-seoul, ap-singapore.
Category Yes String Category
Status Yes String Status
Domain No String Domain name
InstanceID No String Instance ID
IsVersionFour No Boolean Whether it is the bot 4.0 version
BotVersion No String Enter the bot version number, scenario-based version: 4.1.0
DomainList.N No Array of String List of domain names on which bot detection is to be enabled or disabled in batch

3. Output Parameters

Parameter Name Type Description
Data String Normally null

Note: This field may return null, indicating that no valid values can be obtained.
UnSupportedList Array of String List of domain names for which no bots are purchased
Note: This field may return null, indicating that no valid values can be obtained.
FailDomainList Array of String List of domain names which bots are purchased but the operation fails
Note: This field may return null, indicating that no valid values can be obtained.
Count Integer Number of successes
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.

4. Example

Example1 Querying the Enabling Status of the Bot Detection Feature (V2)

Input Example

POST / HTTP/1.1
Host: waf.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyBotStatus
<Common request parameters>



{
    "Category": "bot",
    "Status": "1",
    "Domain": "test.com",
    "InstanceID": "waf_xxx"
}

Output Example

{
    "Response": {
        "Data": null,
        "RequestId": "a0b4e55b-5307-4378-856d-efc22475c77d"
    }
}

Example2 Querying the Enabling Status of the Bot Detection Feature (New)

Input Example

POST / HTTP/1.1
Host: waf.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyBotStatus
<Common request parameters>



{
    "Status": "1",
    "Category": "bot",
    "Domain": "fgsta.qcloudwaf.com",
    "IsVersionFour": "true",
    "BotVersion": "4.1.0"
}

Output Example

{
    "Response": {
        "Data": "",
        "RequestId": "110a2ef2-74ee-4db1-9b96-7da77283653f"
    }
}

Example3 Querying the Enabling Status of the Bot Detection Feature (Old)

Input Example

POST / HTTP/1.1
Host: waf.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyBotStatus
<Common request parameters>



{
    "Status": "0",
    "Category": "bot",
    "Domain": "fgsta.qcloudwaf.com",
    "IsVersionFour": "true"
}

Output Example

{
    "Response": {
        "Data": "",
        "RequestId": "c6ae93c9-f71c-473c-ad9b-ba1b59e47059"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AuthFailure.ErrCodeNoPurchased The current instance has not purchased the API security package.
InternalError Internal error.
UnsupportedOperation.InvalidRequest InvalidRequest