sql_audit

直接审核SQL

Direct audit sql

post/v2/sql_audit

Request

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

Request body

instance_namestring
instance_typestring
project_idstring
rule_template_namestring
schema_namestring
sql_contentstring

调用方不应该关心SQL是否被完美的拆分成独立的条目, 拆分SQL由SQLE实现

sql_type'sql' | 'mybatis' | ''

Example request

{
  "instance_name": "instance1",
  "instance_type": "MySQL",
  "project_id": "700300",
  "rule_template_name": "default",
  "schema_name": "schema1",
  "sql_content": "select * from t1; select * from t2;",
  "sql_type": "sql"
}

Response

OK

codeinteger
messagestring

Example response

{
  "data": {
    "sql_results": [
      {
        "audit_result": [
          {
            "level": "warn",
            "message": "避免使用不必要的内置函数md5()"
          }
        ]
      }
    ]
  },
  "message": "ok"
}

Changes

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