sql_audit

直接从文件内容提取SQL并审核,SQL文件暂时只支持一次解析一个文件

Direct audit sql from SQL files and MyBatis files

post/v1/audit_files

Request

  • Base URL
    /sqle (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /sqle/v1/audit_files
  • Auth
    API key in header Authorization

Request body

file_contentsstring[]

调用方不应该关心SQL是否被完美的拆分成独立的条目, 拆分SQL由SQLE实现 每个数组元素是一个文件内容

instance_namestring
instance_typestring
project_namestring
schema_namestring
sql_type'sql' | 'mybatis' | ''

Example request

{
  "file_contents": [
    "select * from t1; select * from t2;"
  ],
  "instance_name": "instance1",
  "instance_type": "MySQL",
  "project_name": "project1",
  "schema_name": "schema1",
  "sql_type": "sql"
}

Response

OK

codeinteger
messagestring

Example response

{
  "message": "ok"
}

Changes

No recorded changes to this operation across all 75 revisions of this API.