1 Star 0 Fork 54

skymysky / bk-bcs

forked from 腾讯蓝鲸智云 / bk-bcs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
detection.md 1.37 KB
一键复制 编辑 原始数据 按行查看 历史
bergzhao 提交于 2020-03-03 16:47 . feature: detection api文档 #391

bcs apiserver v4 http api

Response

http状态码

  • 成功:2xx
  • 失败:4xx、5xx

返回格式

{
    "code": 0,
    "message":"success",
    "data":{
    }
}
  • code int //"0"表示成功,>0表示失败
  • message string
  • data interface{} //成功返回的数据

url prefix

bcs-api

http://{ipaddr}:{port}/bcsapi

示例: curl -X GET http://127.0.0.1:8081/bcsapi/v4/detection/detectionpods

api

api list

getDetectionPods

描述

get all detection pods

请求地址

  • /v4/detection/detectionpods

请求方式

  • GET

请求示例

curl -X GET http://127.0.0.1:8081/bcsapi/v4/detection/detectionpods

返回结果

{
    "result":true,
    "code":0,
    "message":"success",
    "data":[
        {
            "Ip":"172.32.0.1",
            "Idc":"深圳移动荔景DC"
        },
        {
            "Ip":"172.32.0.1",
            "Idc":"深圳移动荔景DC"
        },
        {
            "Ip":"172.32.0.1",
            "Idc":"深圳移动荔景DC"
        },
        {
            "Ip":"172.32.0.2",
            "Idc":"深圳移动光明DC"
        },
        {
            "Ip":"172.32.0.1",
            "Idc":"深圳移动光明DC"
        },
        {
            "Ip":"172.32.0.3",
            "Idc":"深圳移动光明DC"
        }
    ]
}
Go
1
https://gitee.com/skymysky/bk-bcs.git
git@gitee.com:skymysky/bk-bcs.git
skymysky
bk-bcs
bk-bcs
master

搜索帮助