Help Center/ Cloud Firewall/ API Reference/ API/ Filtering traffic/ Obtaining the Traffic Filtering Switch Information
Updated on 2025-08-12 GMT+08:00

Obtaining the Traffic Filtering Switch Information

Function

Traffic filtering can be enabled or disabled. This API is used to obtain the current switch information.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/ptf/ip-blacklist/switch

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which can be obtained by calling an API or from the console. For details, see Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

fw_instance_id

Yes

String

Firewall ID, which can be obtained by referring to Obtaining a Firewall ID.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

data

IpBlacklistSwitchInfoVo object

The IP address blacklist switch information is included.

Table 4 IpBlacklistSwitchInfoVo

Parameter

Type

Description

status

Integer

The IP address blacklist switch information. 1: enable; 0: disable

Example Requests

Query the IP address blacklist function of the firewall whose project ID is eefb11b22d5944f2aa067954516df1cf and instance ID is e494f486-fa6f-410e-9cfa-8edacfb28970. The query result shows that the function is enabled.

https://{Endpoint}/v1/eefb11b22d5944f2aa067954516df1cf/ptf/ip-blacklist/switch?fw_instance_id=e494f486-fa6f-410e-9cfa-8edacfb28970

Example Responses

Status code: 200

Response body for returning the traffic filtering switch information

{
  "data" : {
    "status" : 1
  }
}

Status Codes

Status Code

Description

200

Response body for returning the traffic filtering switch information

401

Unauthorized: Request error.

403

Forbidden: Access forbidden.

Error Codes

See Error Codes.