Skip to main content

Query SQL Execution Logs

Paging query of NineData SQL execution logs, supporting filtering based on account, time, data source, database table, SQL type, and other conditions.

Request URL: /openapi/v1/actionSQL/list

Request Method: GET

Request Parameters

ParameterTypeRequiredDescriptionExample
accountIdStringNoAccount ID. You can call the List Account Information interface to obtain accountId.170**********159
startTimeDateTimeNoOperation time range - start time.2025-07-31T09:12:30Z
endTimeDateTimeNoOperation time range - end time.2025-07-31T10:12:30Z
moduleStringNoModule. Optional values:
  • sqlWindow: SQL Window
  • sqlExport: Export Result Set.
  • sqlWriteSensitive: Sensitive Data Management.
  • dataExport: Data Export.
  • dataImport: Data Import.
  • ruleSet: SQL Standard.
  • rule: SQL Rule.
  • sqlReview: SQL Review.
  • dataArchive: Data Archiving and Cleaning.
  • dataTrack: Data Tracking and Rollback.
  • slowLog: Slow Query Analysis.
  • dataGenerate: Data Generation.
  • databaseVersion: Database Version.
  • backupTask: Data Backup.
  • restore: Data Restoration.
  • replicationTask: Data Replication.
  • compareData: Data Comparison.
  • compareSchema: Schema Comparison.
  • datasourceOperate: Data Source.
  • gateway: Gateway.
  • accesscredential: Cloud Access Credential.
  • privatelink: Private Network Connection.
  • approval: Approval Process.
  • user: User Management.
  • role: Role Management.
  • organization: Organization Management.
  • permissionApply: Permission Application.
  • reportManage: Report Download.
  • gitProject: Git Configuration.
dataExport
sqlTypeStringNoSQL type, optional values: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, TRUNCATE, CALL, EXECUTE, GRANT, REVOKE, OPTIMIZE, OTHERSELECT
datasourceIdStringNoData source ID.ds-123456
databaseNameStringNoDatabase name.test_db
tableNameStringNoTable name.user_table
sqlStringNoSQL statement.SELECT * FROM user_table
currentIntegerNoCurrent page number, starting from 1, default is 1.1
pageSizeIntegerNoPage size, default is 10.10

Return Parameters

ParameterTypeDescriptionExample
dataArraySQL execution log list, including the following fields:
  • eventTime: Operation time.
  • accountId: Account ID.
  • accountName: Account name.
  • host: Login IP.
  • module: Module, see the module field in the request parameter table for details.
  • type: Event type, fixed to execute for this interface, i.e., SQL execution.
  • sqlType: SQL type, see request parameters.
  • datasourceId: Data source ID.
  • tables: Table object list.
    • databaseName: Database name.
    • schemaName: Schema name.
    • name: Table name.
    • alias: Table alias.
  • sql: SQL statement.
  • status: Execution status.
  • affectedRows: Number of affected rows.
  • sensitiveColumns: Sensitive columns.
  • elaspedTime: Execution time (seconds).
{
"eventTime": "2025-08-04 09:08:11Z",
"accountId": "1327052894132866",
"accountName": "NineData",
"module": "sqlWindow",
"type": "execute",
"sqlType": "GRANT",
"datasourceId": "ds-d59tvhis5v0z",
"sql": "grant select on YQ2.* to YQ;",
"status": "failed",
"affectedRows": 0,
"sensitiveColumns": "",
"elaspedTime": 498.0,
"tables": []
}
currentIntegerCurrent page number.1
pageSizeIntegerPage size.10
totalIntegerTotal number of records.1

Successful Invocation Example

{
"success": true,
"requestId": "Vs4k0DPF-BHFEaIXnCJJz1OJdBGu9FSY",
"data": [{
"eventTime": "2025-08-04 09:08:11Z",
"accountId": "1327052894132866",
"accountName": "NineData",
"module": "sqlWindow",
"type": "execute",
"sqlType": "GRANT",
"datasourceId": "ds-d59tvhis5v0z",
"sql": "grant select on YQ2.* to YQ;",
"status": "failed",
"affectedRows": 0,
"sensitiveColumns": "",
"elaspedTime": 498.0,
"tables": []
}],
"current": 1,
"pageSize": 10,
"total": 1
}