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

Batch Querying SQL Interception Rules

Function

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

URI

GET /v1/{project_id}/sql-defend-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.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

queue_name

No

String

Queue name.

rule_name

No

String

Rule name.

offset

No

Integer

Pagination offset.

limit

No

Integer

Page size.

Request Parameters

None

Response Parameters

Status code: 201

Table 3 Response body parameters

Parameter

Type

Description

rules

Array of SqlDefendRuleDto objects

User-defined rule.

total_count

Integer

Total number of rules.

Table 4 SqlDefendRuleDto

Parameter

Type

Description

rule_uuid

String

Unique ID of a rule.

Maximum length: 64 characters

project_id

String

Project ID, which is used for resource isolation.

Maximum length: 64 characters

rule_name

String

Rule name.

Minimum length: 1 character

Maximum length: 32 characters

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

engine_rules

Object

Rule details.

queue_names

Array of strings

Queue name.

desc

String

User rule description.

Maximum length: 2,000 characters

sys_desc

String

System rule description.

create_time

Long

Time when a rule was created.

update_time

Long

Time when a rule was updated.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

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.