{"base_path":"/","components":null,"consumes":"","definitions":{"CreateTaskRequestV2":{"properties":{"access_token":{"description":"仓库有权限的用户token","example":"testxxxxtest","type":"string"},"check_type":{"description":"检查类型,数组格式,默认为source","items":{"example":"source","type":"string"},"type":"array"},"enable_fossbot":{"description":"是否打开fossbot检查,默认不开","example":true,"type":"boolean"},"endpoint_id":{"description":"仓库有权限的用户endpointId","example":"cd9f6b87ffae43f08cc70a24c7fd7482","type":"string"},"git_branch":{"description":"仓库分支","example":"master","type":"string"},"git_url":{"description":"仓库地址","example":"http://github.*******.git","type":"string"},"inc_config":{"$ref":"#/definitions/IncConfigV2"},"language":{"description":"检查语言,数组格式,支持cpp,java,js,python,php,css,html,go,typescript,csharp","items":{"example":"cpp","type":"string"},"type":"array"},"resource_pool_id":{"description":"资源池id,可以从资源池管理页面获取","example":"cd9f6b87ffae43f08cc70a24c7fd7482","type":"string"},"rule_sets":{"description":"指定规则集","items":{"$ref":"#/definitions/RuleSetV2"},"type":"array"},"task_type":{"description":"检查类型,支持full/inc两种类型,full表示全量检查,inc表示mr检查","example":"full","type":"string"},"username":{"description":"仓库有权限的用户名","example":"test","type":"string"}},"required":["git_url","git_branch","language"]},"ErrorResponse":{"properties":{"error_code":{"description":"错误码","example":"CC.00000000","type":"string"},"error_msg":{"description":"错误描述","example":"网络繁忙,请稍后再试","type":"string"}}},"IncConfigV2":{"description":"增量检查相关的参数","properties":{"action":{"description":"webhook事件状态,open/close/update","example":"open","type":"string"},"event_type":{"description":"webhook触发事件类型,merge_request/push_request","example":"merge_request","type":"string"},"git_source_branch":{"description":"增量检查代码源分支","example":"develop","type":"string"},"git_target_branch":{"description":"增量检查代码目标分支","example":"master","type":"string"},"merge_id":{"description":"MR唯一标示ID","example":"12321","type":"string"},"parent_task_id":{"description":"需要关联的父任务ID,流水线创建或MR创建任务需要该参数","example":"4d8b52e071ce4f73bb552d27076f5e1a","type":"string"},"title":{"description":"MR标题","example":"新增测试用例","type":"string"}}},"RuleSetV2":{"properties":{"language":{"description":"检查语言,支持cpp,java,js,python,php,css,html,go,typescript","example":"cpp","type":"string"},"ruleset_id":{"description":"规则集id,需要从web界面获取","example":"4d8b52e071ce4f73bb552d27076f5e1a","type":"string"}},"required":["language"]},"TaskIdV2":{"properties":{"task_id":{"description":"检查任务id","example":"9e16b*********9471ce5d","type":"string"}},"required":["task_id"]}},"description":null,"group_id":"6e24e1d8225c45beaaeeceee605429ba","host":"codecheck-ext.cn-north-4.myhuaweicloud.com","id":"b20473db044941fd9ebd62cce3a502e6","info_version":"v2","method":"post","name":"CreateTask","parameters":{},"paths":{"/v2/{project_id}/task":{"post":{"consumes":["application/json"],"deprecated":false,"description":"新建检查任务但是不执行。","operationId":"CreateTask","parameters":[{"description":"用户Token。\n\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":100000,"minLength":1,"name":"X-Auth-Token","required":true,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXX..."},{"description":"项目ID","in":"path","name":"project_id","required":true,"type":"string","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"创建仓库的相关信息,check_type只支持source,language支持cpp,java,js,python,php,css,html,go,typescript,csharp","in":"body","name":"CreateTaskV2RequestBody","required":true,"schema":{"$ref":"#/definitions/CreateTaskRequestV2"}}],"produces":["application/json"],"responses":{"200":{"description":"Request succeeded!","examples":{"application/json":{"task_id":"d161fd0**********cb3c1d6a783e"}},"schema":{"$ref":"#/definitions/TaskIdV2"}},"400":{"description":"Bad Request","examples":{"application/json":{"error_code":"CC.00000000","error_msg":"网络繁忙,请稍后再试"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"401":{"description":"Unauthorized","examples":{"application/json":{"error_code":"CC.00000003","error_msg":"认证信息过期"}},"schema":{"$ref":"#/definitions/ErrorResponse"}}},"security":[{"apig-auth-iam":[]}],"summary":"新建检查任务","tags":["任务管理"],"x-apigateway-backend":{"httpEndpoints":{"address":"10.63.38.190:40115","description":"","method":"POST","path":"/codecheck/v2/{project_id}/task","scheme":"https","timeout":60000},"parameters":[{"description":"逻辑region","in":"HEADER","name":"X-AUTH-REGION","origin":"CONSTANT","value":"cn-north-7"},{"description":"项目ID","in":"PATH","name":"project_id","origin":"REQUEST","value":"project_id"}],"type":"HTTP"},"x-apigateway-cors":false,"x-apigateway-match-mode":"NORMAL","x-apigateway-request-type":"public","x-is-registered":"Y","x-name":"新建检查任务","x-request-examples-1":{"check_type":["source"],"git_branch":"master","git_url":"git@code*****************958.git","language":["cpp","js"]},"x-request-examples-description-1":"","x-request-examples-url-1":"POST https://{endpoint}/v2/{project_id}/task","x-support-sdk":"Y","x-version":"v2"}}},"product_short":"CodeCheck","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":{"apig-auth-app":{"in":"header","name":"Authorization","type":"apiKey","x-apigateway-auth-type":"AppSigv1"},"apig-auth-app-optional":{"in":"header","name":"Authorization","type":"apiKey","x-apigateway-auth-opt":{"access-auth-type":"optional"},"x-apigateway-auth-type":"AppSigv1"},"apig-auth-iam":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-type":"IAM"},"apig-auth-iam-none":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-type":"IAM_NONE"}},"summary":"新建检查任务","tags":"任务管理","uri":null,"version":"2.0"}