task

创建Sql扫描任务并提交审核

create and audit a task, you can upload sql content in three ways, any one can be used, but only one is effective.

  1. formData[sql]: sql content;
  2. file[input_sql_file]: it is a sql file;
  3. file[input_mybatis_xml_file]: it is mybatis xml file, sql will be parsed from it.
post/v1/projects/{project_name}/tasks/audits

Request

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

Path parameters

project_namestring required

project name

Request body multipart/form-data

instance_namestring required

instance name

instance_schemastring

schema of instance

enable_backupboolean

enable backup

backup_max_rowsinteger

backup max rows

sqlstring

sqls for audit

rule_template_namestring

rule template name

input_sql_filestring binary

input SQL file

input_mybatis_xml_filestring binary

input mybatis XML file

input_zip_filestring binary

input ZIP file

exec_modestring

exec mode

file_order_methodstring

file order method

Response

OK

codeinteger
messagestring

Example response

{
  "data": {
    "instance_schema": "db1"
  },
  "message": "ok"
}

Changes

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