Updated on 2025-10-29 GMT+08:00

Creating an SQL Verification

Function

This API is used to create an SQL verification.

Calling Method

For details, see Calling APIs.

URI

POST /v2/{project_id}/workspaces/{workspace_id}/siem/sql/validation

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which is used to specify the project that a resource belongs to. You can query the resources of a project by project ID. You can obtain the project ID from the API or console. Obtaining the Project ID

Constraints

N/A

Range

N/A

Default Value

N/A

workspace_id

Yes

String

Workspace ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. Obtaining a User Token

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

script

Yes

String

Job script.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

sources

Array of TableItem objects

Source tables

modes

Array of strings

Modes

Table 5 TableItem

Parameter

Type

Description

project_id

String

Project ID.

workspace_id

String

Workspace ID.

table_id

String

UUID

table_name

String

Table name.

table_alias

String

Table alias

directory

String

Directory group.

description

String

Table description

category

String

Definition

Table type.

  • STREAMING: streaming

  • APPLICATION: application

  • TENANT_OBS: tenant object storage

  • LAKE: data lake

INDEX: index.

Constraints

N/A

Range

  • STREAMING

  • INDEX

  • APPLICATION

  • TENANT_OBS

  • LAKE

Default Value

N/A

lock_status

String

Definition

Table lock status.

  • LOCKED: locked

  • UNLOCKED: unlocked

Constraints

N/A

Range

  • LOCKED

  • UNLOCKED

Default Value

N/A

process_status

String

Definition

Table processing status.

  • COMPLETED: completed

  • CREATING: being created

  • UPDATING: being updated

  • DELETING: being deleted

  • TRUNCATING being cleared

  • CREATE_FAILED: creation failed

  • UPDATING_FAILED: update failed

  • DELETING_FAILED: deletion failed

  • TRUNCATE_FAILED: clearing failed

Constraints

N/A

Range

  • COMPLETED

  • CREATING

  • UPDATING

  • DELETING

  • TRUNCATING

  • CREATE_FAILED

  • UPDATING_FAILED

  • DELETING_FAILED

  • TRUNCATE_FAILED

Default Value

N/A

process_error

String

Definition

Table processing error.

  • NONE

Constraints

N/A

Range

  • NONE

Default Value

N/A

edit_type

String

Definition

Table editing type.

  • MODIFIABLE: modifiable. The table can be modified.

  • APPENDED: appendable. The original content of the table cannot be modified, but new content can be added to the table.

  • LOCKED: locked. The table is completely locked and cannot be modified.

Constraints

N/A

Range

  • MODIFIABLE

  • APPENDED

  • LOCKED

Default Value

N/A

format

String

Definition

Table format.

  • JSON: JSON

  • CSV: CSV

  • PARQUET: PARQUET

  • ORC ORC

-DEBEZIUM_JSON: Debezium JSON

Constraints

N/A

Range

  • JSON

  • DEBEZIUM_JSON

  • CSV

  • PARQUET

  • ORC

Default Value

N/A

rw_type

String

Definition

Table read/write type.

  • READ_ONLY: read-only

  • READ_WRITE: read and write

  • WRITE_ONLY: write-only

Constraints

N/A

Range

  • READ_ONLY

  • READ_WRITE

  • WRITE_ONLY

Default Value

N/A

owner_type

String

Definition

Owner type.

  • SYSTEM: system

  • USER: user

  • SYSTEM_ALLOWED_DELETE: can be deleted by the system

  • USER_ALLOWED_DELETE: can be deleted by the user

Constraints

N/A

Range

  • SYSTEM

  • USER

  • SYSTEM_ALLOWED_DELETE

  • USER_ALLOWED_DELETE

Default Value

N/A

data_layering

String

Definition

Data layers.

  • ODS: operation data storage layer

  • DWS: data warehouse service layer

  • ADS: application data service layer

Constraints

N/A

Range

  • ODS

  • DWS

  • ADS

Default Value

N/A

data_classification

String

Definition

Data classification.

  • FACTUAL_DATA: factual data

  • DIMENSION_DATA: dimension data

Constraints

N/A

Range

  • FACTUAL_DATA

  • DIMENSION_DATA

Default Value

N/A

create_time

Integer

Timestamp, in ms.

update_time

Integer

Timestamp, in ms.

delete_time

Integer

Timestamp, in ms.

store_size_in_bytes

Long

Used storage capacity.

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

Success

Error Codes

See Error Codes.