Help Center/ Data Lake Insight/ API Reference/ SQL Job Interception Rules/ Batch Querying Preset SQL Interception Rules
Updated on 2025-08-06 GMT+08:00

Batch Querying Preset SQL Interception Rules

Function

This API is used to query preset SQL interception rules in batches.

URI

GET /v1/{project_id}/sql-defend-sys-rules

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which is used for resource isolation. For how to obtain a project ID, see Obtaining a Project ID.

Request Parameters

None

Response Parameters

Table 2 Response body parameters

Parameter

Type

Description

rules

Array of SqlDefendSysRuleDto objects

Preset rules.

total_count

Long

Total number of rules.

Table 3 SqlDefendSysRuleDto

Parameter

Type

Description

rule_id

String

Rule type.

Options:

  • static_0001
  • static_0002
  • static_0003
  • static_0004
  • static_0005
  • static_0006
  • static_0007
  • dynamic_0001
  • dynamic_0002
  • running_0002
  • running_0003
  • running_0004

category

String

Rule status type.

Options:

  • static
  • dynamic
  • running

actions

Array of strings

Action that can be performed.

engines

Array of strings

Engines supported.

no_limit

Boolean

Whether the rule has a limit value.

desc

String

Rule description.

Maximum length: 2,000 characters

param

SysRuleParam object

Configuration parameters of system rules.

Table 4 SysRuleParam

Parameter

Type

Description

max

Long

Upper threshold.

min

Long

Lower threshold.

defaultValue

Long

Default threshold.

desc

String

Rule description.

Maximum length: 2,000 characters

Example Request

None

Example Response

None

Status Codes

Status Code

Description

201

Rules are successfully queried.

400

Request error.

500

Internal server error.

Error Codes

If an error occurs when this API is called, the system does not return the result similar to the preceding example, but returns an error code and error message. For details, see Error Codes.