2017-11-07 11:40:44 +08:00
{
"swagger" : "2.0" ,
"paths" : {
"/license" : {
"post" : {
"description" : "post license \u0026 get token" ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"license"
] ,
"summary" : "提交license" ,
"operationId" : "SendLicense" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "license" ,
"name" : "license" ,
"in" : "form" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"bean\":\"{\\\"token\\\": \\\"Q3E5OXdoZDZDX3drN0QtV2gtVmpRaGtlcHJQYmFK\\\"}\"}"
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/apps/{app_name}/discover" : {
"get" : {
"description" : "get endpoints of app_name" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取指定服务endpoints" ,
"operationId" : "GetServiceEndPoints" ,
"responses" : {
"200" : {
"description" : "{\"list\":[{\"name\":\"d275f5b34faf\",\"url\":\"10.0.55.72:6363\",\"weight\":0}]}"
}
}
}
} ,
2017-11-07 11:40:44 +08:00
"/v2/job" : {
"get" : {
"description" : "get job list" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取job列表" ,
"operationId" : "JobList" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "node name" ,
"name" : "node" ,
"in" : "form"
} ,
{
"type" : "string" ,
"format" : "string" ,
"description" : "group name" ,
"name" : "group" ,
"in" : "form"
}
] ,
"responses" : {
"200" : {
"description" : "{\"ok\":true}"
}
}
} ,
"put" : {
"description" : "add or update job" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "添加或者更新job" ,
"operationId" : "UpdateJob" ,
"parameters" : [
{
"type" : "json" ,
"format" : "string" ,
"description" : "{\"id\":\"\",\"kind\":0,\"name\":\"aac\",\"oldGroup\":\"\",\"group\":\"default\",\"user\":\"\",\"cmd\":\"echo \\\"hello \\\"\u003e/tmp/aac.txt\",\"pause\":true,\"parallels\":0,\"timeout\":0,\"interval\":0,\"retry\":0,\"rules\":[{\"id\":\"NEW0.5930536330436825\",\"nids\":[\"172.16.0.118\"],\"timer\":\"* 5 * * * *\",\"exclude_nids\":[\"172.16.0.131\"]}],\"fail_notify\":false,\"to\":[]}" ,
"name" : "job" ,
"in" : "body" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"ok\":true}"
}
}
}
} ,
"/v2/job/group" : {
"get" : {
"description" : "get all groups" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取所有job的group" ,
"operationId" : "GetAllGroup" ,
"responses" : {
"200" : {
"description" : "[\"group1\",...]"
}
}
}
} ,
"/v2/job/{id}/group/{group}" : {
"get" : {
"description" : "get job by group and id" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取 job" ,
"operationId" : "GetJob" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "group name" ,
"name" : "group" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"format" : "string" ,
"description" : "job id" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"id\":\"\",\"kind\":0,\"name\":\"aac\",\"group\":\"default\",\"user\":\"\",\"cmd\":\"echo \\\"hello \\\"\u003e/tmp/aac.txt\",\"pause\":true,\"parallels\":0,\"timeout\":0,\"interval\":0,\"retry\":0,\"rules\":[{\"id\":\"NEW0.5930536330436825\",\"nids\":[\"172.16.0.118\"],\"timer\":\"* 5 * * * *\",\"exclude_nids\":[\"172.16.0.131\"]}],\"fail_notify\":false,\"to\":[]}"
}
}
} ,
"post" : {
"description" : "change job status" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "更改 job 状态" ,
"operationId" : "ChangeJobStatus" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "group name" ,
"name" : "group" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"format" : "string" ,
"description" : "job id" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"format" : "string" ,
"description" : "{\"id\":\"\",\"kind\":0,\"name\":\"aac\",\"group\":\"default\",\"user\":\"\",\"cmd\":\"echo \\\"hello \\\"\u003e/tmp/aac.txt\",\"pause\":true,\"parallels\":0,\"timeout\":0,\"interval\":0,\"retry\":0,\"rules\":[{\"id\":\"NEW0.5930536330436825\",\"nids\":[\"172.16.0.118\"],\"timer\":\"* 5 * * * *\",\"exclude_nids\":[\"172.16.0.131\"]}],\"fail_notify\":false,\"to\":[]}" ,
"in" : "body" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"id\":\"\",\"kind\":0,\"name\":\"aac\",\"group\":\"default\",\"user\":\"\",\"cmd\":\"echo \\\"hello \\\"\u003e/tmp/aac.txt\",\"pause\":true,\"parallels\":0,\"timeout\":0,\"interval\":0,\"retry\":0,\"rules\":[{\"id\":\"NEW0.5930536330436825\",\"nids\":[\"172.16.0.118\"],\"timer\":\"* 5 * * * *\",\"exclude_nids\":[\"172.16.0.131\"]}],\"fail_notify\":false,\"to\":[]}"
}
}
} ,
"delete" : {
"description" : "delete job by group and id" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "删除 job" ,
"operationId" : "DeleteJob" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "group name" ,
"name" : "group" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"format" : "string" ,
"description" : "job id" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"ok\":true}"
}
}
}
} ,
"/v2/job/{id}/group/{group}/node/{name}" : {
"put" : {
"description" : "execute job" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "立即在 node上 执行一次指定group/id 的job" ,
"operationId" : "JobExecute" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "group name" ,
"name" : "group" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"format" : "string" ,
"description" : "job id" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"format" : "string" ,
"description" : "node name" ,
"name" : "name" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"ok\":true}"
}
}
}
} ,
"/v2/job/{id}/groups/{group}/nodes" : {
"get" : {
"description" : "get job runnable nodes" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取job的可执行节点" ,
"operationId" : "GetJobNodes" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "group name" ,
"name" : "group" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"format" : "string" ,
"description" : "job id" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "[\"10.1.1.2\",...]"
}
}
}
} ,
"/v2/nodes" : {
"get" : {
"description" : "get node list info from etcd" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "从etcd获取节点简单列表信息" ,
"operationId" : "GetNodeList" ,
"responses" : {
"200" : {
"description" : "{\"code\":200,\"msg\":\"success\",\"msgcn\":\"成功\",\"body\":{\"list\":[{\"uuid\":\"915f2c95-b723-4c88-9860-dbe33f4f51ac\",\"host_name\":\"10.0.55.73\",\"internal_ip\":\"10.0.55.73\",\"external_ip\":\"10.0.55.73\",\"available_memory\":16267956,\"available_cpu\":4,\"role\":\"compute\",\"status\":\"create\",\"labels\":{\"key1\":\"value1\"},\"unschedulable\":false},{\"uuid\":\"1234c95-b723-4c88-9860-dbe33f4f51ac\",\"host_name\":\"10.0.55.73\",\"internal_ip\":\"10.0.55.73\",\"external_ip\":\"10.0.55.73\",\"available_memory\":16267956,\"available_cpu\":4,\"role\":\"\",\"status\":\"running\",\"labels\":{\"key1\":\"value4\"},\"unschedulable\":false}]}}"
}
}
} ,
"post" : {
"description" : "add new node info to etcd" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "添加新节点到etcd" ,
"operationId" : "New" ,
"parameters" : [
{
"type" : "string" ,
"format" : "json" ,
"description" : "{\"uuid\":\"757755e4-99e4-11e7-bab9-00163e020ab5\",\"host_name\":\"10.0.55.73\",\"internal_ip\":\"10.0.55.73\",\"external_ip\":\"10.0.55.73\",\"available_memory\":16,\"available_cpu\":4,\"role\":\"\",\"status\":\"offline\",\"labels\":{\"key1\":\"value1\"},\"unschedulable\":false}" ,
"in" : "body" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"code\":200,\"msg\":\"success\",\"msgcn\":\"成功\",\"body\":nil}"
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/nodes//{node}/basic" : {
2017-11-07 11:40:44 +08:00
"get" : {
"description" : "get node basic info from etcd" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "从服务器获取节点基本信息" ,
"operationId" : "GetNodeBasic" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "nodeuid" ,
"name" : "node" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"code\":200,\"msg\":\"success\",\"msgcn\":\"成功\",\"body\":{\"list\":null,\"bean\":{{\"uuid\":\"757755e4-99e4-11e7-bab9-00163e020ab5\",\"host_name\":\"10.0.55.73\",\"internal_ip\":\"10.0.55.73\",\"external_ip\":\"10.0.55.73\",\"available_memory\":16,\"available_cpu\":4,\"role\":\"\",\"status\":\"offline\",\"labels\":{\"key1\":\"value1\"},\"unschedulable\":false}}}}"
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/nodes/login" : {
"put" : {
"description" : "try to connect to ssh" ,
2017-11-07 11:40:44 +08:00
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "尝试通过SSH链接远程服务器" ,
"operationId" : "login" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
2017-11-07 19:11:49 +08:00
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"hostport" ,
"type" ,
"hosttype"
] ,
"properties" : {
"hostport" : {
"description" : "ip:端口\nin: body" ,
"type" : "string" ,
"x-go-name" : "HostPort"
} ,
"hosttype" : {
"description" : "节点类型\nin: body" ,
"type" : "string" ,
"x-go-name" : "HostType"
} ,
"pwd" : {
"description" : "root密码\nin: body" ,
"type" : "string" ,
"x-go-name" : "RootPwd"
} ,
"type" : {
"description" : "登录类型\nin: body" ,
"type" : "boolean" ,
"x-go-name" : "LoginType"
}
}
}
2017-11-07 11:40:44 +08:00
}
] ,
"responses" : {
"200" : {
2017-11-07 19:11:49 +08:00
"description" : "{\"bean\":{\"hostport\":\"10.0.55.73:22\",\"type\":true,\"result\":\"success\"}}"
2017-11-07 11:40:44 +08:00
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/nodes/{ip}/init" : {
2017-11-07 11:40:44 +08:00
"put" : {
"description" : "try to basicly init" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "完成基础初始化" ,
"operationId" : "init" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "10.0.55.73" ,
"name" : "ip" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"bean\":{\"List\":[{\"JobSEQ\":\"asdfsa-sdfasdf-asdf\",\"JobId\":\"online_init\",\"JobName\":\"init\",\"JobResult\":0}],\"Result\":false}}"
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/nodes/{ip}/install" : {
"get" : {
"description" : "start build-in jobs" ,
2017-11-07 11:40:44 +08:00
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "开始执行内置任务" ,
"operationId" : "StartBuildInJobs" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
2017-11-07 19:11:49 +08:00
"type" : "string" ,
"format" : "string" ,
"description" : "10.0.55.73" ,
"name" : "ip" ,
"in" : "path" ,
"required" : true
2017-11-07 11:40:44 +08:00
}
] ,
"responses" : {
"200" : {
2017-11-07 19:11:49 +08:00
"description" : "{\"bean\":{\"List\":[{\"JobSEQ\":\"asdfsa-sdfasdf-asdf\",\"JobId\":\"online_init\",\"JobName\":\"init\",\"JobResult\":3}],\"Result\":false}}"
2017-11-07 11:40:44 +08:00
}
}
2017-11-07 19:11:49 +08:00
} ,
2017-11-07 11:40:44 +08:00
"put" : {
"description" : "check job status" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "开始安装" ,
"operationId" : "StartBuildInJobs" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "10.0.55.73" ,
"name" : "ip" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"bean\":{\"List\":[{\"JobSEQ\":\"asdfsa-sdfasdf-asdf\",\"JobId\":\"online_init\",\"JobName\":\"init\",\"JobResult\":3}],\"Result\":false}}"
}
}
}
} ,
"/v2/nodes/{ip}/install/status" : {
"get" : {
"description" : "check job status" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "检查job状态" ,
"operationId" : "CheckJobGetStatus" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "10.0.55.73" ,
"name" : "ip" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"bean\":{\"List\":[{\"JobSEQ\":\"asdfsa-sdfasdf-asdf\",\"JobId\":\"online_init\",\"JobName\":\"init\",\"JobResult\":0}],\"Result\":false}}"
}
}
}
} ,
"/v2/nodes/{node}" : {
"put" : {
"description" : "add node" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "重新上线计算节点" ,
"operationId" : "AddNode" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "nodeuid" ,
"name" : "node" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"code\":200,\"msg\":\"success\",\"msgcn\":\"成功\",\"body\":nil}"
}
}
} ,
"post" : {
"description" : "update" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "更新node" ,
"operationId" : "UpdateNode" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "nodeuid" ,
"name" : "node" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"format" : "string" ,
"description" : "{\"uuid\": \"ccc\", \"Status\":\"create\",\"host_name\": \"10.0.55.73\", \"internal_ip\": \"10.0.55.73\", \"external_ip\": \"10.0.55.73\", \"available_memory\": 16267956, \"available_cpu\": 4, \"role\": \"\", \"labels\": {\"key1\": \"value1\"}, \"unschedulable\": false}" ,
"in" : "body" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"code\":200,\"msg\":\"success\",\"msgcn\":\"成功\",\"body\":{\"list\":[{\"uuid\":\"1234c95-b723-4c88-9860-dbe33f4f51ac\",\"host_name\":\"10.0.55.73\",\"internal_ip\":\"10.0.55.73\",\"external_ip\":\"10.0.55.73\",\"available_memory\":16267956,\"available_cpu\":4,\"role\":\"\",\"status\":\"running\",\"labels\":{\"key1\":\"value4\"},\"unschedulable\":false}]}}"
}
}
} ,
"delete" : {
"description" : "delete node from etcd" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "从etcd 删除计算节点" ,
"operationId" : "DeleteFromDB" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "nodeuid" ,
"name" : "node" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"code\":200,\"msg\":\"success\",\"msgcn\":\"成功\",\"body\":nil}"
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/nodes/{node}/details" : {
"get" : {
"description" : "get node details info from k8s" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "从服务器获取节点详细信息" ,
"operationId" : "GetNodeDetails" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "nodeuid" ,
"name" : "node" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"code\":200,\"msg\":\"success\",\"msgcn\":\"成功\",\"body\":{\"list\":null,\"bean\":{\"name\":\"10.0.55.73\",\"role\":\"\",\"labels\":{\"key1\":\"value1\"},\"annotations\":{\"node.alpha.kubernetes.io/ttl\":\"0\",\"volumes.kubernetes.io/controller-managed-attach-detach\":\"true\"},\"creationtimestamp\":\"2017-09-19 11:23:09 +0800 CST\",\"conditions\":[{\"type\":\"OutOfDisk\",\"status\":\"False\",\"lastHeartbeatTime\":\"2017-09-20T01:37:25Z\",\"lastTransitionTime\":\"2017-09-19T03:23:18Z\",\"reason\":\"KubeletHasSufficientDisk\",\"message\":\"kubelet has sufficient disk space available\"},{\"type\":\"MemoryPressure\",\"status\":\"False\",\"lastHeartbeatTime\":\"2017-09-20T01:37:25Z\",\"lastTransitionTime\":\"2017-09-19T03:23:18Z\",\"reason\":\"KubeletHasSufficientMemory\",\"message\":\"kubelet has sufficient memory available\"},{\"type\":\"DiskPressure\",\"status\":\"False\",\"lastHeartbeatTime\":\"2017-09-20T01:37:25Z\",\"lastTransitionTime\":\"2017-09-19T03:23:18Z\",\"reason\":\"KubeletHasNoDiskPressure\",\"message\":\"kubelet has no disk pressure\"},{\"type\":\"Ready\",\"status\":\"True\",\"lastHeartbeatTime\":\"2017-09-20T01:37:25Z\",\"lastTransitionTime\":\"2017-09-19T10:59:55Z\",\"reason\":\"KubeletReady\",\"message\":\"kubelet is posting ready status\"}],\"addresses\":{\"Hostname\":\"10.0.55.73\",\"InternalIP\":\"10.0.55.73\",\"LegacyHostIP\":\"10.0.55.73\"},\"capacity\":{\"cpu\":\"4\",\"memory\":\"15886\",\"pods\":\"10k\"},\"allocatable\":{\"cpu\":\"4\",\"memory\":\"15786\",\"pods\":\"10k\"},\"systeminfo\":{\"machineID\":\"df39b3efbcee4d5c84b2feab34009235\",\"systemUUID\":\"08A7D00A-C4B6-4AB7-8D8D-DA14C104A4DC\",\"bootID\":\"b4cd3c6c-e18d-43ae-9f11-3125110e9179\",\"kernelVersion\":\"3.10.0-514.21.2.el7.x86_64\",\"osImage\":\"CentOS Linux 7 (Core)\",\"containerRuntimeVersion\":\"docker://1.12.6\",\"kubeletVersion\":\"v1.6.4-66+4fd15729100998-dirty\",\"kubeProxyVersion\":\"v1.6.4-66+4fd15729100998-dirty\",\"operatingSystem\":\"linux\",\"architecture\":\"amd64\"},\"externalid\":\"10.0.55.73\",\"nonterminatedpods\":[{\"namespace\":\"1b56aa1ed27b4289b6f108e551545f29\",\"id\":\"gr04bff0\",\"name\":\"c0dd44112bd39ff7dda3ac3a47e619ea-3m1m8\",\"cpurequest\":\"80m\",\"cpurequestr\":\"2\",\"cpulimits\":\"120m\",\"cpulimitsr\":\"3\",\"memoryrequests\":\"268435456\",\"memoryrequestsr\":\"0\",\"memorylimits\":\"268435456\",\"memorylimitsr\":\"0\"},{\"namespace\":\"1b56aa1ed27b4289b6f108e551545f29\",\"id\":\"gr04bff0\",\"name\":\"c0dd44112bd39ff7dda3ac3a47e619ea-bxfmc\",\"cpurequest\":\"80m\",\"cpurequestr\":\"2\",\"cpulimits\":\"120m\",\"cpulimitsr\":\"3\",\"memoryrequests\":\"268435456\",\"memoryrequestsr\":\"0\",\"memorylimits\":\"268435456\",\"memorylimitsr\":\"0\"},{\"namespace\":\"1b56aa1ed27b4289b6f108e551545f29\",\"id\":\"\",\"name\":\"web-0\",\"cpurequest\":\"0\",\"cpurequestr\":\"0\",\"cpulimits\":\"0\",\"cpulimitsr\":\"0\",\"memoryrequests\":\"0\",\"memoryrequestsr\":\"0\",\"memorylimits\":\"0\",\"memorylimitsr\":\"0\"},{\"namespace\":\"1b56aa1ed27b4289b6f108e551545f29\",\"id\":\"\",\"name\":\"web-1\",\"cpurequest\":\"0\",\"cpurequestr\":\"0\",\"cpulimits\":\"0\",\"cpulimitsr\":\"0\",\"memoryrequests\":\"0\",\"memoryrequestsr\":\"0\",\"memorylimits\":\"0\",\"memorylimitsr\":\"0\"},{\"namespace\":\"232bd923d3794b979974bb21b863608b\",\"id\":\"gr184a0b\",\"name\":\"bc74e3d2cc734ce1a81f0a1903286e35-g4p31\",\"cpurequest\":\"480m\",\"cpurequestr\":\"12\",\"cpulimits\":\"1780m\",\"cpulimitsr\":\"44\",\"memoryrequests\":\"2Gi\",\"memoryrequestsr\":\"12\",\"memorylimits\":\"2Gi\",\"memorylimitsr\":\"12\"},{\"namespace\":\"232bd923d3794b979974bb21b863608b\",\"id\":\"gr868196\",\"name\":\"d2fa251096c9452ba25d081d861265d9-mdqln\",\"cpurequest\":\"120m\",\"cpurequestr\":\"3\",\"cpulimits\":\"640m\",\"cpulimitsr\":\"16\",\"memoryrequests\":\"512Mi\",\"memoryrequestsr\":\"3\",\"memorylimits\":\"512Mi\",\"memorylimitsr\":\"3\"}],\"allocatedresources\":{\"CPULimits\":\"2660\",\"CPULimitsR\":\"66\",\"CPURequests\":\"760\",\"CPURequestsR\":\"19\",\"MemoryLimits\":\"3072\",\"MemoryLimitsR\":\"15\",\" M e m o r y
}
}
}
} ,
2017-11-07 11:40:44 +08:00
"/v2/nodes/{node}/down" : {
"post" : {
"description" : "offline node" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "下线计算节点" ,
"operationId" : "DeleteNode" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "nodeuid" ,
"name" : "node" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"code\":200,\"msg\":\"success\",\"msgcn\":\"成功\",\"body\":nil}"
}
}
}
} ,
"/v2/nodes/{node}/label" : {
"post" : {
"description" : "add label to node" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "为node添加label" ,
2017-11-07 19:11:49 +08:00
"operationId" : "labels" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "NodeID" ,
2017-11-07 11:40:44 +08:00
"name" : "node" ,
"in" : "path" ,
"required" : true
} ,
{
2017-11-07 19:11:49 +08:00
"name" : "Body" ,
2017-11-07 11:40:44 +08:00
"in" : "body" ,
2017-11-07 19:11:49 +08:00
"schema" : {
"type" : "object" ,
"required" : [
"labels"
] ,
"properties" : {
"labels" : {
"description" : "label值列表\nin: body" ,
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"x-go-name" : "Labels"
}
}
}
2017-11-07 11:40:44 +08:00
}
] ,
"responses" : {
"200" : {
"description" : "{\"code\":200,\"msg\":\"success\",\"msgcn\":\"成功\",\"body\":nil}"
}
}
}
} ,
"/v2/nodes/{node}/reschedulable" : {
"put" : {
"description" : "make node schedulable" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "使节点可调度" ,
"operationId" : "UnCordon" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "nodeuid" ,
"name" : "node" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"code\":200,\"msg\":\"success\",\"msgcn\":\"成功\",\"body\":nil}"
}
}
}
} ,
"/v2/nodes/{node}/unschedulable" : {
"put" : {
"description" : "make node unschedulable" ,
"produces" : [
"application/json"
] ,
"tags" : [
"v2"
] ,
"summary" : "使节点不可调度" ,
"operationId" : "Cordon" ,
"parameters" : [
{
"type" : "string" ,
"format" : "string" ,
"description" : "nodeuid" ,
"name" : "node" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "{\"code\":200,\"msg\":\"success\",\"msgcn\":\"成功\",\"body\":nil}"
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/opentsdb/query" : {
"post" : {
"description" : "query opentsdb" ,
2017-11-07 11:40:44 +08:00
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-28 18:58:07 +08:00
"summary" : "监控数据查询 " ,
2017-11-07 19:11:49 +08:00
"operationId" : "oentsdbquery" ,
"parameters" : [
{
"name" : "Body" ,
"in" : "body" ,
2017-11-07 11:40:44 +08:00
"schema" : {
2017-11-07 19:11:49 +08:00
"type" : "object" ,
"required" : [
"start" ,
"queries"
] ,
"properties" : {
"queries" : {
"description" : "in: body" ,
"type" : "string" ,
"x-go-name" : "Queries"
} ,
"start" : {
"description" : "in: body" ,
"type" : "string" ,
"x-go-name" : "Start"
}
}
2017-11-07 11:40:44 +08:00
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/resources/tenants" : {
2017-11-07 11:40:44 +08:00
"post" : {
2017-11-07 19:11:49 +08:00
"description" : "get tenant resources" ,
2017-11-07 11:40:44 +08:00
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-28 18:58:07 +08:00
"summary" : "租户资源使用情况 " ,
2017-11-07 19:11:49 +08:00
"operationId" : "tenantResources" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"tenant_name"
] ,
"properties" : {
"tenant_name" : {
2017-11-07 19:11:49 +08:00
"description" : "in: body" ,
"type" : "array" ,
"items" : {
"type" : "string"
} ,
2017-11-07 11:40:44 +08:00
"x-go-name" : "TenantName"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/resources/tenants/sum" : {
2017-11-07 11:40:44 +08:00
"get" : {
"description" : "get tenant resources" ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-28 18:58:07 +08:00
"summary" : "获取租户数量 " ,
2017-11-07 19:11:49 +08:00
"operationId" : "sumTenants" ,
2017-11-07 11:40:44 +08:00
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/show" : {
2017-11-07 11:40:44 +08:00
"get" : {
2017-11-07 19:11:49 +08:00
"description" : "show api version" ,
2017-11-07 11:40:44 +08:00
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "显示当前的api version 信息" ,
"operationId" : "getApiVersion" ,
2017-11-07 11:40:44 +08:00
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
2017-11-07 19:11:49 +08:00
}
} ,
"/v2/tenants" : {
2017-11-07 11:40:44 +08:00
"post" : {
2017-11-07 19:11:49 +08:00
"description" : "add tenant" ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-28 18:58:07 +08:00
"summary" : "添加租户信息 " ,
2017-11-07 19:11:49 +08:00
"operationId" : "addTenant" ,
"parameters" : [
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"properties" : {
"eid" : {
"description" : "the eid\nin : body" ,
"type" : "string" ,
"x-go-name" : "Eid"
} ,
"tenant_id" : {
"description" : "the tenant id\nin: body" ,
"type" : "string" ,
"x-go-name" : "TenantID"
} ,
"tenant_name" : {
"description" : "the tenant name\nin: body" ,
"type" : "string" ,
"x-go-name" : "TenantName"
} ,
"token" : {
"type" : "string" ,
"x-go-name" : "Token"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/cloud-share" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "share cloud " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "云市分享" ,
"operationId" : "sharecloud" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
2017-11-07 19:11:49 +08:00
"kind"
2017-11-07 11:40:44 +08:00
] ,
"properties" : {
2017-11-07 19:11:49 +08:00
"Image" : {
"$ref" : "#/definitions/ImageShare"
} ,
"Slug" : {
"$ref" : "#/definitions/SlugShare"
} ,
"kind" : {
"description" : "分享类型, app_slug/ app_image\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "Kind"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/code-check" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "check code " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "应用代码检测" ,
"operationId" : "checkCode" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"git_url" ,
"url_repos" ,
"check_type" ,
"code_version" ,
"git_project_id" ,
"code_from" ,
"service_id"
] ,
"properties" : {
"action" : {
"type" : "string" ,
"x-go-name" : "Action"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"check_type" : {
"description" : "检测类型, \"first_check\"\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "CheckType"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"code_from" : {
"description" : "git源, \"gitlab_manual\"\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "CodeFrom"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"code_version" : {
"description" : "代码分支\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "CodeVersion"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"git_project_id" : {
"description" : "git project id, 0\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "integer" ,
"format" : "int64" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "GitProjectID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"git_url" : {
"description" : "git分支详情\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "GitURL"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"service_id" : {
"description" : "应用id\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "ServiceID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"tenant_id" : {
"description" : "租户id\nin: body" ,
"type" : "string" ,
"x-go-name" : "TenantID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"url_repos" : {
"description" : "git地址\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "URLRepos"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/plugin" : {
"post" : {
"description" : "create plugin" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "创建插件" ,
"operationId" : "createPlugin" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"plugin_id" ,
"plugin_name"
] ,
"properties" : {
"build_model" : {
"description" : "构建模式\nin: body" ,
"type" : "string" ,
"x-go-name" : "BuildModel"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"env_info" : {
"description" : "in: body" ,
2017-11-07 11:40:44 +08:00
"type" : "array" ,
"items" : {
2017-11-07 19:11:49 +08:00
"$ref" : "#/definitions/PluginDefaultENV"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "EVNInfo"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"git_url" : {
"description" : "git地址\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "GitURL"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"image_local" : {
"description" : "插件goodrain地址\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "ImageLocal"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"image_url" : {
"description" : "插件docker地址\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "ImageURL"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"plugin_cmd" : {
"description" : "插件启动命令\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "PluginCMD"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"plugin_id" : {
"description" : "in: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "PluginID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"plugin_info" : {
"description" : "插件用途描述\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "PluginInfo"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"plugin_model" : {
"description" : "插件模式\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "PluginModel"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"plugin_name" : {
"description" : "in: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "PluginName"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"repo" : {
"description" : "带分支信息的git地址\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "Repo"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"tenant_id" : {
"description" : "in: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "TenantID"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/plugin/{plugin_id}" : {
"put" : {
"description" : "update plugin" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "插件更新 全量更新, 但pluginID和所在租户不提供修改" ,
"operationId" : "updatePlugin" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "PluginID" ,
"name" : "plugin_id" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"properties" : {
"build_model" : {
"description" : "构建模式\nin: body" ,
"type" : "string" ,
"x-go-name" : "BuildModel"
} ,
"git_url" : {
"description" : "git地址\nin: body" ,
"type" : "string" ,
"x-go-name" : "GitURL"
} ,
"image_local" : {
"description" : "插件goodrain地址\nin: body" ,
"type" : "string" ,
"x-go-name" : "ImageLocal"
} ,
"image_url" : {
"description" : "插件docker地址\nin: body" ,
"type" : "string" ,
"x-go-name" : "ImageURL"
} ,
"plugin_cmd" : {
"description" : "插件启动命令\nin: body" ,
"type" : "string" ,
"x-go-name" : "PluginCMD"
} ,
"plugin_info" : {
"description" : "插件用途描述\nin: body" ,
"type" : "string" ,
"x-go-name" : "PluginInfo"
} ,
"plugin_model" : {
"description" : "插件模式\nin: body" ,
"type" : "string" ,
"x-go-name" : "PluginModel"
} ,
"plugin_name" : {
"description" : "插件名称\nin: body" ,
"type" : "string" ,
"x-go-name" : "PluginName"
} ,
"repo" : {
"description" : "带分支信息的git地址\nin: body" ,
"type" : "string" ,
"x-go-name" : "Repo"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"delete" : {
"description" : "delete plugin" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "插件删除" ,
"operationId" : "deletePlugin" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "PluginID" ,
"name" : "plugin_id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/plugin/{plugin_id}/build" : {
"post" : {
"description" : "build plugin" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "构建plugin" ,
"operationId" : "buildPlugin" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "PluginID" ,
"name" : "plugin_id" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"event_id" ,
"kind" ,
"deploy_version" ,
"info"
] ,
"properties" : {
"deploy_version" : {
"description" : "部署的版本号\nin: body" ,
"type" : "string" ,
"x-go-name" : "DeployVersion"
} ,
"event_id" : {
"description" : "the event id\nin: body" ,
"type" : "string" ,
"x-go-name" : "EventID"
} ,
"git_url" : {
"description" : "git地址\nin: body" ,
"type" : "string" ,
"x-go-name" : "GitURL"
} ,
"image_url" : {
"description" : "镜像地址\nin: body" ,
"type" : "string" ,
"x-go-name" : "ImageURL"
} ,
"info" : {
"description" : "版本信息, 协助选择插件版本\nin:body" ,
"type" : "string" ,
"x-go-name" : "Info"
} ,
"kind" : {
"description" : "插件构建类型, image/dockerfile\nin: body" ,
"type" : "string" ,
"x-go-name" : "Kind"
} ,
"operator" : {
"description" : "操作人\nin: body" ,
"type" : "string" ,
"x-go-name" : "Operator"
} ,
"repo_url" : {
"description" : "git地址 带版本\nin: body" ,
"type" : "string" ,
"x-go-name" : "RepoURL"
} ,
"tenant_id" : {
"description" : "租户id\nin: body" ,
"type" : "string" ,
"x-go-name" : "TenantID"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/plugin/{plugin_id}/build-version" : {
"get" : {
"description" : "all plugin versions" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取所有的构建版本信息" ,
"operationId" : "allPluginVersions" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "PluginID" ,
"name" : "plugin_id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/plugin/{plugin_id}/build-version/{version_id}" : {
"get" : {
"description" : "plugin version" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取某个构建版本信息" ,
"operationId" : "pluginVersion" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "PluginID" ,
"name" : "plugin_id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "VersionID" ,
"name" : "version_id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"delete" : {
"description" : "delete plugin version" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "删除某个构建版本信息" ,
"operationId" : "deletePluginVersion" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "PluginID" ,
"name" : "plugin_id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "VersionID" ,
"name" : "version_id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/plugin/{plugin_id}/default-env" : {
"put" : {
"description" : "update default env" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "更新插件默认变量,支持批量" ,
"operationId" : "updatedefaultenv" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "PluginID" ,
"name" : "plugin_id" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"EVNInfo"
] ,
"properties" : {
"EVNInfo" : {
"description" : "in: body" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/PluginDefaultENV"
}
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"post" : {
"description" : "add default env" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "添加插件默认变量" ,
"operationId" : "adddefaultenv" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "PluginID" ,
"name" : "plugin_id" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"EVNInfo"
] ,
"properties" : {
"EVNInfo" : {
"description" : "in: body" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/PluginDefaultENV"
}
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/plugin/{plugin_id}/default-env/{env_name}" : {
"delete" : {
"description" : "delete default env" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "删除插件默认变量" ,
"operationId" : "deletedefaultenv" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "PluginID" ,
"name" : "plugin_id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ENVName" ,
"description" : "配置项名称" ,
"name" : "env_name" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/resources" : {
"get" : {
"description" : "get tenant resources" ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-28 18:58:07 +08:00
"summary" : "指定租户资源使用情况 " ,
2017-11-07 19:11:49 +08:00
"operationId" : "singletenantResources" ,
"parameters" : [
{
"type" : "string" ,
"description" : "tenant name" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services" : {
"get" : {
2017-11-28 18:58:07 +08:00
"description" : "get services info in tenant " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取租户所有应用信息" ,
"operationId" : "getServiceInfo" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "create service " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "创建应用" ,
"operationId" : "createService" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"service_alias"
] ,
"properties" : {
"category" : {
"description" : "服务分类: application,cache,store\nin: body" ,
"type" : "string" ,
"x-go-name" : "Category"
} ,
"code_from" : {
"description" : "代码来源:gitlab,github\nin: body" ,
"type" : "string" ,
"x-go-name" : "CodeFrom"
} ,
"comment" : {
"description" : "服务描述\nin: body" ,
"type" : "string" ,
"x-go-name" : "Comment"
} ,
"container_cmd" : {
"description" : "容器启动命令\nin: body" ,
"type" : "string" ,
"x-go-name" : "ContainerCMD"
} ,
"container_cpu" : {
"description" : "容器CPU权重\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "ContainerCPU"
} ,
"container_env" : {
"description" : "容器环境变量\nin: body" ,
"type" : "string" ,
"x-go-name" : "ContainerEnv"
} ,
"container_memory" : {
"description" : "容器最大内存\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "ContainerMemory"
} ,
"depend_ids" : {
"description" : "依赖id, 格式: []struct TenantServiceRelation\nin: body" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/TenantServiceRelation"
} ,
"x-go-name" : "DependIDs"
} ,
"deploy_version" : {
"description" : "部署版本\nin: body" ,
"type" : "string" ,
"x-go-name" : "DeployVersion"
} ,
"envs_info" : {
"description" : "环境变量信息, 格式: []struct TenantServiceEnvVar\nin: body" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/TenantServiceEnvVar"
} ,
"x-go-name" : "EnvsInfo"
} ,
"event_id" : {
"description" : "最新操作ID\nin: body" ,
"type" : "string" ,
"x-go-name" : "EventID"
} ,
"extend_method" : {
"description" : "扩容方式; 0:无状态; 1:有状态; 2:分区\nin: body" ,
"type" : "string" ,
"x-go-name" : "ExtendMethod"
} ,
"host_path" : {
"description" : "宿主机目录\nin: body" ,
"type" : "string" ,
"x-go-name" : "HostPath"
} ,
"image_name" : {
"description" : "镜像名称\nin: body" ,
"type" : "string" ,
"x-go-name" : "ImageName"
} ,
"namespace" : {
"description" : "镜像来源\nin: body" ,
"type" : "string" ,
"x-go-name" : "Namespace"
} ,
"node_label" : {
"description" : "节点标签,格式: v1,v2\nin: body" ,
"type" : "string" ,
"x-go-name" : "NodeLabel"
} ,
"operator" : {
"description" : "操作人\nin: body" ,
"type" : "string" ,
"x-go-name" : "Operator"
} ,
"port_type" : {
"description" : "端口类型, one_outer;dif_protocol;multi_outer\nin: body" ,
"type" : "string" ,
"x-go-name" : "PortType"
} ,
"ports_info" : {
"description" : "端口信息, 格式: []struct TenantServicesPort\nin: body" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/TenantServicesPort"
} ,
"x-go-name" : "PortsInfo"
} ,
"replicas" : {
"description" : "节点数\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "Replicas"
} ,
"service_alias" : {
"description" : "服务别名\nin: body" ,
"type" : "string" ,
"x-go-name" : "ServiceAlias"
} ,
"service_id" : {
"description" : "应用id\nin: body" ,
"type" : "string" ,
"x-go-name" : "ServiceID"
} ,
"service_key" : {
"description" : "服务key\nin: body" ,
"type" : "string" ,
"x-go-name" : "ServiceKey"
} ,
"service_label" : {
"description" : "应用标签,value\nin: body" ,
"type" : "string" ,
"x-go-name" : "ServiceLabel"
} ,
"service_origin" : {
"description" : "服务创建类型cloud云市服务,assistant云帮服务\nin: body" ,
"type" : "string" ,
"x-go-name" : "ServiceOrigin"
} ,
"service_type" : {
"description" : "服务类型\nin: body" ,
"type" : "string" ,
"x-go-name" : "ServiceType"
} ,
"service_version" : {
"description" : "服务版本\nin: body" ,
"type" : "string" ,
"x-go-name" : "ServiceVersion"
} ,
"tenant_id" : {
"description" : "租户id\nin: body" ,
"type" : "string" ,
"x-go-name" : "TenantID"
} ,
"update_time" : {
"description" : "更新时间\nin: body" ,
"x-go-name" : "UpdateTime"
} ,
"volume_mount_path" : {
"description" : "容器挂载目录\nin: body" ,
"type" : "string" ,
"x-go-name" : "VolumeMountPath"
} ,
"volume_path" : {
"description" : "卷名字\nin: body" ,
"type" : "string" ,
"x-go-name" : "VolumePath"
} ,
"volume_type" : {
"description" : "共享类型shared、exclusive\nin: body" ,
"type" : "string" ,
"x-go-name" : "VolumeType"
} ,
"volumes_info" : {
"description" : "持久化目录信息, 格式: []struct TenantServiceVolume\nin: body" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/TenantServiceVolume"
} ,
"x-go-name" : "VolumesInfo"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}" : {
"get" : {
2017-11-28 18:58:07 +08:00
"description" : "get service info " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取应用信息" ,
"operationId" : "getService" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"put" : {
2017-11-28 18:58:07 +08:00
"description" : "update service " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "应用更新" ,
"operationId" : "updateService" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"properties" : {
"container_cmd" : {
"description" : "容器启动命令\nin: body" ,
"type" : "string" ,
"x-go-name" : "ContainerCMD"
} ,
"container_memory" : {
"description" : "容器最大内存\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "ContainerMemory"
} ,
"image_name" : {
"description" : "镜像名称\nin: body" ,
"type" : "string" ,
"x-go-name" : "ImageName"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"delete" : {
"description" : "delete service" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "删除应用" ,
"operationId" : "deleteService" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/build" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "service build " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "应用构建" ,
"operationId" : "serviceBuild" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"event_id" ,
"kind" ,
"deploy_version"
] ,
"properties" : {
"action" : {
"description" : "后续动作, 根据该值进行一键部署,如果不传值,则默认只进行构建\nin: body" ,
"type" : "string" ,
"x-go-name" : "Action"
} ,
"deploy_version" : {
"description" : "部署的版本号\nin: body" ,
"type" : "string" ,
"x-go-name" : "DeployVersion"
} ,
"envs" : {
"description" : "变量\nin: body" ,
"type" : "object" ,
"additionalProperties" : {
"type" : "string"
} ,
"x-go-name" : "ENVS"
} ,
"event_id" : {
"description" : "the event id\nin: body" ,
"type" : "string" ,
"x-go-name" : "EventID"
} ,
"image_url" : {
"description" : "镜像地址\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "ImageURL"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"kind" : {
"description" : "应用构建类型\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "Kind"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"operator" : {
"description" : "操作人员\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "Operator"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"repo_url" : {
"description" : "git地址\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "RepoURL"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"service_alias" : {
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "ServiceAlias"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"tenant_name" : {
"type" : "string" ,
"x-go-name" : "TenantName"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/dependency" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "add dependency " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "增加应用依赖关系" ,
"operationId" : "addDependency" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"dep_service_id"
] ,
"properties" : {
"dep_order" : {
"description" : "不明,默认传 1, 可以不传\nin: body" ,
"type" : "string" ,
"x-go-name" : "DepOrder"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"dep_service_id" : {
"description" : "被依赖的应用id\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "DepServiceID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"dep_service_type" : {
"description" : "被依赖的应用类型,添加时需要传值, 删除时不需要传值\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "DepServiceType"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"delete" : {
2017-11-28 18:58:07 +08:00
"description" : "delete dependency " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "删除应用依赖关系" ,
"operationId" : "deleteDependency" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"dep_service_id"
] ,
"properties" : {
"dep_order" : {
"description" : "不明,默认传 1, 可以不传\nin: body" ,
"type" : "string" ,
"x-go-name" : "DepOrder"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"dep_service_id" : {
"description" : "被依赖的应用id\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "DepServiceID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"dep_service_type" : {
"description" : "被依赖的应用类型,添加时需要传值, 删除时不需要传值\nin: body" ,
"type" : "string" ,
"x-go-name" : "DepServiceType"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/tenants/{tenant_name}/services/{service_alias}/depvolumes" : {
2017-11-07 11:40:44 +08:00
"get" : {
2017-11-07 19:11:49 +08:00
"description" : "get depvolumes" ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "获取应用依赖的存储(V2.1支持多种类型存储)" ,
"operationId" : "getDepVolumes" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "add volume dependency " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "增加应用持久化依赖(V2.1支持多种类型存储)" ,
"operationId" : "addDepVolume" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
2017-11-07 19:11:49 +08:00
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"depend_service_id" ,
"volume_path" ,
"volume_name"
] ,
"properties" : {
"depend_service_id" : {
"description" : "依赖的服务id\nin: body" ,
"type" : "string" ,
"x-go-name" : "DependServiceID"
} ,
"volume_name" : {
"description" : "依赖存储名称\nin: body" ,
"type" : "string" ,
"x-go-name" : "VolumeName"
} ,
"volume_path" : {
"description" : "容器挂载目录\nin: body" ,
"type" : "string" ,
"x-go-name" : "VolumePath"
}
}
}
2017-11-07 11:40:44 +08:00
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"delete" : {
2017-11-28 18:58:07 +08:00
"description" : "delete volume dependency " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "删除应用持久化依赖(V2.1支持多种类型存储)" ,
"operationId" : "delDepVolume" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
2017-11-07 19:11:49 +08:00
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"depend_service_id" ,
"volume_name"
] ,
"properties" : {
"depend_service_id" : {
"description" : "依赖的服务id\nin: body" ,
"type" : "string" ,
"x-go-name" : "DependServiceID"
} ,
"volume_name" : {
"description" : "依赖存储名称\nin: body" ,
"type" : "string" ,
"x-go-name" : "VolumeName"
}
}
}
2017-11-07 11:40:44 +08:00
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/tenants/{tenant_name}/services/{service_alias}/env" : {
2017-11-07 11:40:44 +08:00
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "add env var " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "增加环境变量" ,
"operationId" : "addEnv" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
2017-11-07 19:11:49 +08:00
"env_name"
2017-11-07 11:40:44 +08:00
] ,
"properties" : {
2017-11-07 19:11:49 +08:00
"container_port" : {
"description" : "端口\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "ContainerPort"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"env_name" : {
"description" : "变量名称\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "AttrName"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"env_value" : {
"description" : "变量值, 增加时需要传值, 删除时可以不传\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "AttrValue"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"is_change" : {
"description" : "是否可以修改\nin: body" ,
"type" : "boolean" ,
"x-go-name" : "IsChange"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"name" : {
"description" : "name\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "Name"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"scope" : {
"description" : "应用范围: inner or outer or both\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "Scope"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
2017-11-07 19:11:49 +08:00
} ,
"delete" : {
2017-11-28 18:58:07 +08:00
"description" : "delete env var " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "删除环境变量" ,
"operationId" : "deleteEnv" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
2017-11-07 19:11:49 +08:00
"env_name"
2017-11-07 11:40:44 +08:00
] ,
"properties" : {
2017-11-07 19:11:49 +08:00
"container_port" : {
"description" : "端口\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "ContainerPort"
} ,
"env_name" : {
"description" : "变量名称\nin: body" ,
"type" : "string" ,
"x-go-name" : "AttrName"
} ,
"env_value" : {
"description" : "变量值, 增加时需要传值, 删除时可以不传\nin: body" ,
"type" : "string" ,
"x-go-name" : "AttrValue"
} ,
"is_change" : {
"description" : "是否可以修改\nin: body" ,
"type" : "boolean" ,
"x-go-name" : "IsChange"
} ,
"name" : {
"description" : "name\nin: body" ,
"type" : "string" ,
"x-go-name" : "Name"
} ,
"scope" : {
"description" : "应用范围: inner or outer or both\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "Scope"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/tenants/{tenant_name}/services/{service_alias}/event-log" : {
2017-11-07 11:40:44 +08:00
"post" : {
2017-11-07 19:11:49 +08:00
"description" : "get log by level" ,
2017-11-07 11:40:44 +08:00
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-28 18:58:07 +08:00
"summary" : "获取指定操作的操作日志 " ,
2017-11-07 19:11:49 +08:00
"operationId" : "logByAction" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
2017-11-07 19:11:49 +08:00
"level" ,
"event_id"
2017-11-07 11:40:44 +08:00
] ,
"properties" : {
2017-11-07 19:11:49 +08:00
"event_id" : {
"description" : "eventID\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "EventID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"level" : {
"description" : "日志级别info/debug/error\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "Level"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
2017-11-07 19:11:49 +08:00
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/horizontal" : {
"put" : {
2017-11-28 18:58:07 +08:00
"description" : "service horizontal " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "应用水平伸缩" ,
"operationId" : "horizontalService" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
2017-11-07 19:11:49 +08:00
"event_id"
2017-11-07 11:40:44 +08:00
] ,
"properties" : {
2017-11-07 19:11:49 +08:00
"event_id" : {
"description" : "the event id\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "EventID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"node_num" : {
"description" : "伸缩数量\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "NodeNUM"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/tenants/{tenant_name}/services/{service_alias}/language" : {
2017-11-07 11:40:44 +08:00
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "set language " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "设置应用语言" ,
"operationId" : "setLanguage" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
2017-11-07 19:11:49 +08:00
"event_id" ,
"language"
2017-11-07 11:40:44 +08:00
] ,
"properties" : {
2017-11-07 19:11:49 +08:00
"event_id" : {
"description" : "the tenant id\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "EventID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"language" : {
"description" : "the language\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "Language"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
2017-11-07 19:11:49 +08:00
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/log" : {
"post" : {
"description" : "get last x lines logs" ,
2017-11-07 11:40:44 +08:00
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-28 18:58:07 +08:00
"summary" : "获取最新指定数量条日志 " ,
2017-11-07 19:11:49 +08:00
"operationId" : "lastLinesLogs" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
2017-11-07 19:11:49 +08:00
"type" : "object" ,
"required" : [
"lines"
] ,
"properties" : {
"lines" : {
"description" : "行数\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "Lines"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/tenants/{tenant_name}/services/{service_alias}/log-file" : {
"get" : {
"description" : "get log list" ,
2017-11-07 11:40:44 +08:00
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-28 18:58:07 +08:00
"summary" : "获取应用日志列表 " ,
2017-11-07 19:11:49 +08:00
"operationId" : "logList" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/tenants/{tenant_name}/services/{service_alias}/log-file/{file_name}" : {
"get" : {
"description" : "get log file" ,
2017-11-07 11:40:44 +08:00
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-28 18:58:07 +08:00
"summary" : "下载应用指定日志 " ,
2017-11-07 19:11:49 +08:00
"operationId" : "logFile" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
2017-11-07 19:11:49 +08:00
"type" : "string" ,
"x-go-name" : "FileName" ,
"name" : "file_name" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
2017-11-07 11:40:44 +08:00
"schema" : {
2017-11-07 19:11:49 +08:00
"$ref" : "#/responses/commandResponse"
2017-11-07 11:40:44 +08:00
}
}
2017-11-07 19:11:49 +08:00
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/log-instance" : {
"get" : {
"description" : "get log socket" ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-28 18:58:07 +08:00
"summary" : "获取应用日志web-socket实例 " ,
2017-11-07 19:11:49 +08:00
"operationId" : "logSocket" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
}
2017-11-07 11:40:44 +08:00
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/node-label" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "add node label " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "添加节点标签" ,
"operationId" : "addNodeLabel" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"label_values"
] ,
"properties" : {
"label_values" : {
2017-11-07 19:11:49 +08:00
"description" : "标签值,格式为\"[v1, v2, v3]\"\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"x-go-name" : "LabelValues"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"delete" : {
2017-11-28 18:58:07 +08:00
"description" : "delete node label " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "删除节点标签" ,
"operationId" : "deleteNodeLabel" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"label_values"
] ,
"properties" : {
"label_values" : {
2017-11-07 19:11:49 +08:00
"description" : "标签值,格式为\"[v1, v2, v3]\"\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"x-go-name" : "LabelValues"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
2017-11-07 19:11:49 +08:00
"/v2/tenants/{tenant_name}/services/{service_alias}/plugin" : {
"put" : {
"description" : "update plugin setting" ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "更新插件设定" ,
"operationId" : "updatePluginSet" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"description" : "tenant name" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"post" : {
"description" : "get plugin setting" ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取插件设定" ,
"operationId" : "getPluginSet" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"description" : "tenant name" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/plugin/{plugin_id}" : {
"post" : {
"description" : "delete plugin relation" ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "删除插件依赖" ,
"operationId" : "deletePluginRelation" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"description" : "tenant name" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
2017-11-07 11:40:44 +08:00
"/v2/tenants/{tenant_name}/services/{service_alias}/pods" : {
"get" : {
2017-11-28 18:58:07 +08:00
"description" : "get pods info " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取pods信息" ,
"operationId" : "getPodsInfo" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/ports" : {
2017-11-07 19:11:49 +08:00
"put" : {
2017-11-28 18:58:07 +08:00
"description" : "update port " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "更新应用端口信息" ,
"operationId" : "updatePort" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"properties" : {
"Port" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/TenantServicesPort"
}
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
2017-11-07 11:40:44 +08:00
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "add port " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "增加应用端口,默认关闭对内和对外选项,需要开启使用相应接口" ,
"operationId" : "addPort" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
2017-11-07 19:11:49 +08:00
"schema" : {
"type" : "object" ,
"properties" : {
"Port" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/TenantServicesPort"
}
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/ports/{port}" : {
"delete" : {
2017-11-28 18:58:07 +08:00
"description" : "delete port " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "删除端口变量" ,
2017-11-07 19:11:49 +08:00
"operationId" : "deletePort" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "Port" ,
"description" : "容器端口" ,
"name" : "port" ,
"in" : "path" ,
"required" : true
}
] ,
2017-11-07 11:40:44 +08:00
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/ports/{port}/inner" : {
2017-11-07 19:11:49 +08:00
"put" : {
2017-11-28 18:58:07 +08:00
"description" : "add port " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "开关对内服务,应用无需重启,自动生效" ,
"operationId" : "PortInnerController" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "Port" ,
"name" : "port" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"operation"
] ,
"properties" : {
"operation" : {
"description" : "操作值 `close` or `open`\nin: body" ,
"type" : "string" ,
"x-go-name" : "Operation"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/ports/{port}/outer" : {
2017-11-07 19:11:49 +08:00
"put" : {
2017-11-28 18:58:07 +08:00
"description" : "add port " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "开关端口对外服务,应用无需重启自动生效" ,
"operationId" : "PortOuterController" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "Port" ,
"name" : "port" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"operation"
] ,
"properties" : {
"operation" : {
"description" : "操作值 `close` or `open`\nin: body" ,
"type" : "string" ,
"x-go-name" : "Operation"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/probe" : {
"put" : {
2017-11-28 18:58:07 +08:00
"description" : "update probe " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "更新应用探针信息, *注意此处为全量更新" ,
2017-11-07 11:40:44 +08:00
"operationId" : "updateProbe" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"probe_id"
] ,
"properties" : {
"cmd" : {
"description" : "运行命令\nin: body" ,
"type" : "string" ,
"x-go-name" : "Cmd"
} ,
"failure_threshold" : {
"description" : "标志为失败的检测次数\nin: body" ,
2017-11-07 19:11:49 +08:00
"type" : "integer" ,
"format" : "int64" ,
2017-11-07 11:40:44 +08:00
"x-go-name" : "FailureThreshold"
} ,
"http_header" : {
"description" : "http请求头,key=value,key2=value2\nin: body" ,
"type" : "string" ,
"x-go-name" : "HTTPHeader"
} ,
"initial_delay_second" : {
"description" : "初始化等候时间, 默认为1\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "InitialDelaySecond"
} ,
"is_used" : {
"description" : "是否启用\nin: body" ,
2017-11-07 19:11:49 +08:00
"type" : "integer" ,
"format" : "int64" ,
2017-11-07 11:40:44 +08:00
"x-go-name" : "IsUsed"
} ,
"mode" : {
"description" : "mode\nin: body" ,
"type" : "string" ,
"x-go-name" : "Mode"
} ,
"path" : {
"description" : "path\nin: body" ,
"type" : "string" ,
"x-go-name" : "Path"
} ,
"period_second" : {
"description" : "检测间隔时间, 默认为3\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "PeriodSecond"
} ,
"port" : {
"description" : "端口, 默认为80\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "Port"
} ,
"probe_id" : {
"description" : "探针id\nin: body" ,
"type" : "string" ,
"x-go-name" : "ProbeID"
} ,
"scheme" : {
"description" : "mode\nin: body" ,
"type" : "string" ,
"x-go-name" : "Scheme"
} ,
"success_threshold" : {
"description" : "标志为成功的检测次数\nin: body" ,
2017-11-07 19:11:49 +08:00
"type" : "integer" ,
"format" : "int64" ,
2017-11-07 11:40:44 +08:00
"x-go-name" : "SuccessThreshold"
} ,
"timeout_second" : {
"description" : "检测超时时间, 默认为30\nin: body" ,
2017-11-07 19:11:49 +08:00
"type" : "integer" ,
"format" : "int64" ,
2017-11-07 11:40:44 +08:00
"x-go-name" : "TimeoutSecond"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "add probe " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "增加应用探针" ,
"operationId" : "addProbe" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"probe_id"
] ,
"properties" : {
"cmd" : {
"description" : "运行命令\nin: body" ,
"type" : "string" ,
"x-go-name" : "Cmd"
} ,
"failure_threshold" : {
"description" : "标志为失败的检测次数\nin: body" ,
2017-11-07 19:11:49 +08:00
"type" : "integer" ,
"format" : "int64" ,
2017-11-07 11:40:44 +08:00
"x-go-name" : "FailureThreshold"
} ,
"http_header" : {
"description" : "http请求头,key=value,key2=value2\nin: body" ,
"type" : "string" ,
"x-go-name" : "HTTPHeader"
} ,
"initial_delay_second" : {
"description" : "初始化等候时间, 默认为1\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "InitialDelaySecond"
} ,
"is_used" : {
"description" : "是否启用\nin: body" ,
2017-11-07 19:11:49 +08:00
"type" : "integer" ,
"format" : "int64" ,
2017-11-07 11:40:44 +08:00
"x-go-name" : "IsUsed"
} ,
"mode" : {
"description" : "mode\nin: body" ,
"type" : "string" ,
"x-go-name" : "Mode"
} ,
"path" : {
"description" : "path\nin: body" ,
"type" : "string" ,
"x-go-name" : "Path"
} ,
"period_second" : {
"description" : "检测间隔时间, 默认为3\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "PeriodSecond"
} ,
"port" : {
"description" : "端口, 默认为80\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "Port"
} ,
"probe_id" : {
"description" : "探针id\nin: body" ,
"type" : "string" ,
"x-go-name" : "ProbeID"
} ,
"scheme" : {
"description" : "mode\nin: body" ,
"type" : "string" ,
"x-go-name" : "Scheme"
} ,
"success_threshold" : {
"description" : "标志为成功的检测次数\nin: body" ,
2017-11-07 19:11:49 +08:00
"type" : "integer" ,
"format" : "int64" ,
2017-11-07 11:40:44 +08:00
"x-go-name" : "SuccessThreshold"
} ,
"timeout_second" : {
"description" : "检测超时时间, 默认为30\nin: body" ,
2017-11-07 19:11:49 +08:00
"type" : "integer" ,
"format" : "int64" ,
2017-11-07 11:40:44 +08:00
"x-go-name" : "TimeoutSecond"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"delete" : {
2017-11-28 18:58:07 +08:00
"description" : "delete probe " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "删除应用探针" ,
"operationId" : "deleteProbe" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"probe_id"
] ,
"properties" : {
"probe_id" : {
"description" : "探针id\nin: body" ,
"type" : "string" ,
"x-go-name" : "ProbeID"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/restart" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "restart service " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "重启应用" ,
"operationId" : "restartService" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"event_id"
] ,
"properties" : {
"event_id" : {
"description" : "the tenant id\nin: body" ,
"type" : "string" ,
"x-go-name" : "EventID"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/rollback" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "service rollback " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "应用版本回滚" ,
"operationId" : "rollback" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"event_id" ,
"deploy_version"
] ,
"properties" : {
"deploy_version" : {
"description" : "回滚到的版本号\nin: body" ,
"type" : "string" ,
"x-go-name" : "DeployVersion"
} ,
"event_id" : {
"description" : "event_id\nin: body" ,
"type" : "string" ,
"x-go-name" : "EventID"
} ,
"operator" : {
"description" : "操作人\nin: body" ,
"type" : "string" ,
"x-go-name" : "Operator"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/service-label" : {
"put" : {
2017-11-28 18:58:07 +08:00
"description" : "delete service label " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "更新应用标签" ,
2017-11-07 11:40:44 +08:00
"operationId" : "updateServiceLabel" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
2017-11-07 19:11:49 +08:00
"label_values"
2017-11-07 11:40:44 +08:00
] ,
"properties" : {
2017-11-07 19:11:49 +08:00
"label_values" : {
2017-11-07 11:40:44 +08:00
"description" : "标签值,格式为\"v1\"\nin: bod" ,
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "LabelValues"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "add service label " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "添加应用标签" ,
"operationId" : "addServiceLabel" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
2017-11-07 19:11:49 +08:00
"label_values"
2017-11-07 11:40:44 +08:00
] ,
"properties" : {
2017-11-07 19:11:49 +08:00
"label_values" : {
2017-11-07 11:40:44 +08:00
"description" : "标签值,格式为\"v1\"\nin: bod" ,
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "LabelValues"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/start" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "start service " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "启动应用" ,
"operationId" : "startService" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"event_id"
] ,
"properties" : {
"event_id" : {
"description" : "the tenant id\nin: body" ,
"type" : "string" ,
"x-go-name" : "EventID"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/status" : {
"get" : {
"description" : "get service status" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取应用状态" ,
"operationId" : "serviceStatus" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/stop" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "stop service " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "关闭应用" ,
"operationId" : "stopService" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"event_id"
] ,
"properties" : {
"event_id" : {
"description" : "the tenant id\nin: body" ,
"type" : "string" ,
"x-go-name" : "EventID"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/upgrade" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "upgrade service " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "升级应用" ,
"operationId" : "upgradeService" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"event_id" ,
"deploy_version"
] ,
"properties" : {
"deploy_version" : {
"description" : "版本号\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "DeployVersion"
} ,
"event_id" : {
"description" : "the event id\nin: body" ,
"type" : "string" ,
"x-go-name" : "EventID"
} ,
"operator" : {
"description" : "操作人员\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "Operator"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/vertical" : {
"put" : {
2017-11-28 18:58:07 +08:00
"description" : "service vertical " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "应用垂直伸缩" ,
"operationId" : "verticalService" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"event_id"
] ,
"properties" : {
"container_cpu" : {
"description" : "cpu数量\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "ContainerCPU"
} ,
"container_memory" : {
"description" : "内存大小\nin: body" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "ContainerMemory"
} ,
2017-11-07 19:11:49 +08:00
"event_id" : {
"description" : "the event id\nin: body" ,
"type" : "string" ,
"x-go-name" : "EventID"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/volume" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "add volume " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "增加应用持久化信息" ,
"operationId" : "addVolume" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"category" ,
"volume_path" ,
"host_path"
] ,
"properties" : {
"category" : {
"description" : "类型 \"application;app_publish\"\nin: body" ,
"type" : "string" ,
"x-go-name" : "Category"
} ,
"host_path" : {
"description" : "宿主机挂载目录\nin: body" ,
"type" : "string" ,
"x-go-name" : "HostPath"
} ,
"volume_path" : {
"description" : "容器挂载目录\nin: body" ,
"type" : "string" ,
"x-go-name" : "VolumePath"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
} ,
"delete" : {
2017-11-28 18:58:07 +08:00
"description" : "delete volume " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "删除应用持久化信息" ,
"operationId" : "deleteVolume" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"category" ,
"volume_path"
] ,
"properties" : {
"category" : {
"description" : "类型 \"application;app_publish\"\nin: body" ,
"type" : "string" ,
"x-go-name" : "Category"
} ,
"volume_path" : {
"description" : "容器挂载目录\nin: body" ,
"type" : "string" ,
"x-go-name" : "VolumePath"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/volume-dependency" : {
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "add volume dependency " ,
2017-11-07 19:11:49 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "增加应用持久化依赖" ,
"operationId" : "addVolumeDependency" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
"depend_service_id" ,
"mnt_dir" ,
"mnt_name"
] ,
"properties" : {
"depend_service_id" : {
"description" : "依赖的服务id\nin: body" ,
"type" : "string" ,
"x-go-name" : "DependServiceID"
} ,
"mnt_dir" : {
"description" : "挂载目录\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "MntDir"
} ,
"mnt_name" : {
"description" : "挂载容器内目录名称\nin: body" ,
"type" : "string" ,
"x-go-name" : "MntName"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
2017-11-07 19:11:49 +08:00
} ,
"delete" : {
2017-11-28 18:58:07 +08:00
"description" : "delete volume dependency " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "删除应用持久化依赖" ,
"operationId" : "deleteVolumeDependency" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
2017-11-07 19:11:49 +08:00
"depend_service_id"
2017-11-07 11:40:44 +08:00
] ,
"properties" : {
2017-11-07 19:11:49 +08:00
"depend_service_id" : {
"description" : "依赖的服务id\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "DependServiceID"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
2017-11-07 19:11:49 +08:00
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/volumes" : {
"get" : {
"description" : "get volumes" ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "获取应用全部存储,包括依赖的存储(V2.1支持多种类型存储)" ,
"operationId" : "getVolumes" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
2017-11-07 19:11:49 +08:00
} ,
2017-11-07 11:40:44 +08:00
"post" : {
2017-11-28 18:58:07 +08:00
"description" : "add volume " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "增加应用持久化信息(V2.1支持多种类型存储)" ,
"operationId" : "addVolumes" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"schema" : {
"type" : "object" ,
"required" : [
2017-11-07 19:11:49 +08:00
"category" ,
"volume_path" ,
"volume_type" ,
"volume_name"
2017-11-07 11:40:44 +08:00
] ,
"properties" : {
2017-11-07 19:11:49 +08:00
"category" : {
"description" : "类型 \"application;app_publish\"\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "Category"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"volume_name" : {
"description" : "存储名称(同一个应用唯一)\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "VolumeName"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"volume_path" : {
"description" : "容器挂载目录\nin: body" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
2017-11-07 19:11:49 +08:00
"x-go-name" : "VolumePath"
} ,
"volume_type" : {
"description" : "存储类型( share,local,tmpfs) \nin: body" ,
"type" : "string" ,
"x-go-name" : "VolumeType"
2017-11-07 11:40:44 +08:00
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
2017-11-07 19:11:49 +08:00
}
} ,
"/v2/tenants/{tenant_name}/services/{service_alias}/volumes/{volume_name}" : {
2017-11-07 11:40:44 +08:00
"delete" : {
2017-11-28 18:58:07 +08:00
"description" : "delete volume " ,
2017-11-07 11:40:44 +08:00
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
2017-11-07 19:11:49 +08:00
"summary" : "删除应用持久化信息(V2.1支持多种类型存储)" ,
"operationId" : "deleteVolumes" ,
2017-11-07 11:40:44 +08:00
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"x-go-name" : "ServiceAlias" ,
"name" : "service_alias" ,
"in" : "path" ,
"required" : true
} ,
{
2017-11-07 19:11:49 +08:00
"type" : "string" ,
"x-go-name" : "VolumeName" ,
"description" : "存储名称" ,
"name" : "volume_name" ,
"in" : "path" ,
"required" : true
2017-11-07 11:40:44 +08:00
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
} ,
"/v2/tenants/{tenant_name}/services_status" : {
"post" : {
"description" : "get service statuslist" ,
"consumes" : [
"application/json" ,
"application/x-protobuf"
] ,
"produces" : [
"application/json" ,
"application/xml"
] ,
"tags" : [
"v2"
] ,
"summary" : "获取应用状态" ,
"operationId" : "serviceStatuslist" ,
"parameters" : [
{
"type" : "string" ,
"x-go-name" : "TenantName" ,
"name" : "tenant_name" ,
"in" : "path" ,
"required" : true
} ,
{
"name" : "Body" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"required" : [
"service_ids"
] ,
"properties" : {
"service_ids" : {
"description" : "需要获取状态的服务ID列表,若不指定,返回租户所有应用的状态\nin: body" ,
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"x-go-name" : "ServiceIDs"
}
}
}
}
] ,
"responses" : {
"default" : {
"description" : "统一返回格式" ,
"schema" : {
"$ref" : "#/responses/commandResponse"
}
}
}
}
}
} ,
"definitions" : {
2017-11-07 19:11:49 +08:00
"ImageShare" : {
"description" : "ImageShare image 类型" ,
2017-11-07 11:40:44 +08:00
"type" : "object" ,
"properties" : {
2017-11-07 19:11:49 +08:00
"action" : {
"type" : "string" ,
"x-go-name" : "Action"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"app_version" : {
"type" : "string" ,
"x-go-name" : "APPVersion"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"dest" : {
"type" : "string" ,
"x-go-name" : "Dest"
} ,
"event_id" : {
"type" : "string" ,
"x-go-name" : "EventID"
} ,
"image" : {
"type" : "string" ,
"x-go-name" : "Image"
} ,
"is_outer" : {
"type" : "boolean" ,
"x-go-name" : "IsOuter"
} ,
"service_key" : {
"type" : "string" ,
"x-go-name" : "ServiceKey"
} ,
"share_id" : {
"type" : "string" ,
"x-go-name" : "ShareID"
}
} ,
"x-go-package" : "github.com/goodrain/rainbond/pkg/api/model"
} ,
"PluginDefaultENV" : {
"description" : "PluginDefaultENV 插件默认环境变量" ,
"type" : "object" ,
"required" : [
"env_name" ,
"env_value"
] ,
"properties" : {
"env_name" : {
"description" : "配置项名称\nin: path" ,
"type" : "string" ,
"x-go-name" : "ENVName"
} ,
"env_value" : {
"description" : "配置项值\nin: path" ,
"type" : "string" ,
"x-go-name" : "ENVValue"
} ,
"plugin_id" : {
"description" : "对应插件id\nin: path" ,
"type" : "string" ,
"x-go-name" : "PluginID"
}
} ,
"x-go-package" : "github.com/goodrain/rainbond/pkg/api/model"
} ,
"SlugShare" : {
"description" : "SlugShare Slug 类型" ,
"type" : "object" ,
"properties" : {
"action" : {
"type" : "string" ,
"x-go-name" : "Action"
} ,
"app_version" : {
"type" : "string" ,
"x-go-name" : "APPVersion"
} ,
"deploy_version" : {
"type" : "string" ,
"x-go-name" : "DeployVersion"
} ,
"dest" : {
"type" : "string" ,
"x-go-name" : "Dest"
} ,
"event_id" : {
"type" : "string" ,
"x-go-name" : "EventID"
} ,
"is_outer" : {
"type" : "boolean" ,
"x-go-name" : "IsOuter"
} ,
"service_id" : {
"type" : "string" ,
"x-go-name" : "ServiceID"
} ,
"service_key" : {
"type" : "string" ,
"x-go-name" : "ServiceKey"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"share_id" : {
"type" : "string" ,
"x-go-name" : "ShareID"
} ,
"tenant_id" : {
"type" : "string" ,
"x-go-name" : "TenantID"
}
} ,
"x-go-package" : "github.com/goodrain/rainbond/pkg/api/model"
} ,
"TenantServiceEnvVar" : {
"description" : "TenantServiceEnvVar 应用环境变量" ,
"type" : "object" ,
"properties" : {
2017-11-07 11:40:44 +08:00
"CreatedAt" : { } ,
"ID" : {
"type" : "integer" ,
"format" : "uint64"
} ,
2017-11-07 19:11:49 +08:00
"attr_name" : {
"type" : "string" ,
"x-go-name" : "AttrName"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"attr_value" : {
"type" : "string" ,
"x-go-name" : "AttrValue"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"container_port" : {
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "ContainerPort"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"is_change" : {
"type" : "boolean" ,
"x-go-name" : "IsChange"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"name" : {
"type" : "string" ,
"x-go-name" : "Name"
} ,
"scope" : {
"type" : "string" ,
"x-go-name" : "Scope"
} ,
"service_id" : {
"type" : "string" ,
"x-go-name" : "ServiceID"
} ,
"tenant_id" : {
"type" : "string" ,
"x-go-name" : "TenantID"
2017-11-07 11:40:44 +08:00
}
} ,
2017-11-07 19:11:49 +08:00
"x-go-package" : "github.com/goodrain/rainbond/pkg/db/model"
2017-11-07 11:40:44 +08:00
} ,
"TenantServiceRelation" : {
"description" : "TenantServiceRelation 应用依赖关系" ,
"type" : "object" ,
"properties" : {
"CreatedAt" : { } ,
2017-11-07 19:11:49 +08:00
"ID" : {
2017-11-07 11:40:44 +08:00
"type" : "integer" ,
2017-11-07 19:11:49 +08:00
"format" : "uint64"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"dep_order" : {
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "DependOrder"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"dep_service_type" : {
"type" : "string" ,
"x-go-name" : "DependServiceType"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"depend_service_id" : {
"type" : "string" ,
"x-go-name" : "DependServiceID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"service_id" : {
"type" : "string" ,
"x-go-name" : "ServiceID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"tenant_id" : {
"type" : "string" ,
"x-go-name" : "TenantID"
2017-11-07 11:40:44 +08:00
}
} ,
2017-11-07 19:11:49 +08:00
"x-go-package" : "github.com/goodrain/rainbond/pkg/db/model"
2017-11-07 11:40:44 +08:00
} ,
"TenantServiceVolume" : {
"description" : "TenantServiceVolume 应用持久化纪录" ,
"type" : "object" ,
"properties" : {
"CreatedAt" : { } ,
"ID" : {
"type" : "integer" ,
"format" : "uint64"
} ,
"category" : {
2017-11-07 19:11:49 +08:00
"description" : "服务类型" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
"x-go-name" : "Category"
} ,
"host_path" : {
2017-11-07 19:11:49 +08:00
"description" : "主机地址" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
"x-go-name" : "HostPath"
} ,
"is_read_only" : {
2017-11-07 19:11:49 +08:00
"description" : "是否只读" ,
2017-11-07 11:40:44 +08:00
"type" : "boolean" ,
"x-go-name" : "IsReadOnly"
} ,
"service_id" : {
"type" : "string" ,
"x-go-name" : "ServiceID"
} ,
2017-11-07 19:11:49 +08:00
"volume_name" : {
"description" : "存储名称" ,
"type" : "string" ,
"x-go-name" : "VolumeName"
} ,
2017-11-07 11:40:44 +08:00
"volume_path" : {
2017-11-07 19:11:49 +08:00
"description" : "挂载地址" ,
2017-11-07 11:40:44 +08:00
"type" : "string" ,
"x-go-name" : "VolumePath"
2017-11-07 19:11:49 +08:00
} ,
"volume_type" : {
"description" : "存储类型( share,local,tmpfs) " ,
"type" : "string" ,
"x-go-name" : "VolumeType"
2017-11-07 11:40:44 +08:00
}
} ,
2017-11-07 19:11:49 +08:00
"x-go-package" : "github.com/goodrain/rainbond/pkg/db/model"
2017-11-07 11:40:44 +08:00
} ,
"TenantServicesPort" : {
"description" : "TenantServicesPort 应用端口信息" ,
"type" : "object" ,
"properties" : {
"ID" : {
"type" : "integer" ,
"format" : "uint64"
} ,
2017-11-07 19:11:49 +08:00
"container_port" : {
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "ContainerPort"
} ,
"is_inner_service" : {
"type" : "boolean" ,
"x-go-name" : "IsInnerService"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"is_outer_service" : {
"type" : "boolean" ,
"x-go-name" : "IsOuterService"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"mapping_port" : {
2017-11-07 11:40:44 +08:00
"type" : "integer" ,
2017-11-07 19:11:49 +08:00
"format" : "int64" ,
"x-go-name" : "MappingPort"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"port_alias" : {
"type" : "string" ,
"x-go-name" : "PortAlias"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"protocol" : {
"type" : "string" ,
"x-go-name" : "Protocol"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"service_id" : {
"type" : "string" ,
"x-go-name" : "ServiceID"
2017-11-07 11:40:44 +08:00
} ,
2017-11-07 19:11:49 +08:00
"tenant_id" : {
"type" : "string" ,
"x-go-name" : "TenantID"
2017-11-07 11:40:44 +08:00
}
} ,
2017-11-07 19:11:49 +08:00
"x-go-package" : "github.com/goodrain/rainbond/pkg/api/model"
2017-11-07 11:40:44 +08:00
} ,
"Values" : {
"description" : "It is typically used for query parameters and form values.\nUnlike in the http.Header map, the keys in a Values map\nare case-sensitive." ,
"type" : "object" ,
"title" : "Values maps a string key to a list of values." ,
"additionalProperties" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"x-go-package" : "net/url"
}
} ,
"responses" : {
"commandResponse" : {
"description" : "CommandResponse api统一返回结构" ,
"schema" : {
"type" : "object" ,
"properties" : {
"bean" : {
"description" : "单资源实体" ,
"type" : "object" ,
"x-go-name" : "Bean"
} ,
"list" : {
"description" : "资源列表" ,
"type" : "object" ,
"x-go-name" : "List"
} ,
"msg" : {
"description" : "API错误信息" ,
"type" : "string" ,
"x-go-name" : "Msg"
} ,
"number" : {
"description" : "数据集总数" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "ListAllNumber"
} ,
"page" : {
"description" : "当前页码数" ,
"type" : "integer" ,
"format" : "int64" ,
"x-go-name" : "Page"
} ,
"validation_error" : {
"$ref" : "#/definitions/Values"
}
}
}
}
}
}