Create audit task
Called by external integration platforms to create a SQL audit task. Supports idempotency (via requestId) and multiple SQL sources (text, deployment package, commit, merge request, directory).
Body
Create SQL audit task request
SQL source configuration
Workspace ID
"1730411624641736706"
Audit template ID
"100"
Platform instance identifier (e.g. blueking-prod, coding-prod)
"blueking-prod"
Idempotency key (external request ID, optional. When empty, idempotency is not checked and the audit runs every time)
Database version
Operator email (optional. When provided, the audit task is created as this user)
Whether to run index recommendation, default true; when false, only audits without index recommendation
Platform type: blueking/coding (optional, used to explicitly specify the source platform)
Extended data (passed through to the result)
Response
Audit task created successfully
SQL audit task response
Task ID
Idempotency key (external request ID)
Task status: accepted/running/finished
accepted, running, finished Decision result: allow/deny/timeout/failed
allow, deny, timeout, failed Error code (only present when result=failed)
Error message (only present when result=failed)
Risk level: 0-critical 1-warning 2-notice
0, 1, 2 Risk level description: critical/warning/notice
critical, warning, notice Statistics information
Audit summary (Markdown format, suitable for display)
Audit summary (structured JSON, suitable for metrics analysis)
Report detail page URL
Report HTML content
Callback status: pending/success/failed/skipped
Callback result message
Completion time
Extended data (passed through)
Associated ticket ID
Ticket title (usable for platform search)
Associated audit ID
Workspace information
Environment information
Organization information
Rule template information
Operator email
Whether to run index recommendation