{ "swagger": "2.0", "info": { "title": "ZTF服务端API文档", "contact": { "name": "API Support", "url": "https://github.com/easysoft/zentaoatf/issues", "email": "462626@qq.com" }, "version": "1.0" }, "paths": { "/api/v1/jobs/add": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "summary": "添加脚本执行任务", "parameters": [ { "description": "Zentao Job Add Request Object", "name": "ZentaoExecReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/serverDomain.ZentaoExecReq" } } ], "responses": { "200": { "description": "code = success | fail", "schema": { "$ref": "#/definitions/domain.Response" } } } } }, "/api/v1/jobs/cancel": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "summary": "取消脚本执行任务", "parameters": [ { "description": "Zentao Job Cancel Request Object", "name": "ZentaoExecReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/serverDomain.ZentaoCancelReq" } } ], "responses": { "200": { "description": "code = success | fail", "schema": { "$ref": "#/definitions/domain.Response" } } } } } }, "definitions": { "domain.Response": { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "object" }, "msg": { "type": "string" } } }, "serverDomain.ZentaoCancelReq": { "type": "object", "properties": { "task": { "type": "integer" } } }, "serverDomain.ZentaoExecReq": { "type": "object", "properties": { "cmd": { "description": "commands to exec before run test cases", "type": "string" }, "ids": { "description": "zentao case ids", "type": "string" }, "path": { "description": "relative path in workspace to find scripts", "type": "string" }, "task": { "type": "integer" }, "workspace": { "description": "workspace absolute path", "type": "string" } } } } }