搜索看看
数据开放接口 / 获取主机cpu使用率%列表接口
1、示例,下面【2】是参数说明:
请求URL:http://localhost:9999/systemInfoOpen/agentCpuStatesList 请求方式:POST 请求参数(Content-Type:application/json): { "wgToken":"65d05df102851c6535322e73b2f99c06", "hostname":"192.168.1.2", "startTime":"2021-04-26 00:00:00", "endTime":"2021-04-26 23:59:59", "page":1, "pageSize":20 } 返回结果: { "msg":"", "code":"0", "data":{ "pageSize":2, "list":[ { "dateStr":"22:04:22", "sys":16.8, "hostname":"10.2.10.19", "createTime":1640613862000, "id":"1475467631493513216" } ], "pageNum":1, "total":15, "pages":8 } }
2、参数说明:
请求参数(Content-Type:application/json): { "wgToken":"必填,server/config/application.yml里的wgToken配置项的md5加密字符串,大小写均可", "hostname":"必填,主机ip,完全匹配", "startTime":"非必填,开始时间", "endTime":"非必填,结束时间", "orderBy":"非必填,排序字段,v3.4.4开始支持此参数,如:SYS", "orderType":"非必填,降序或升序,v3.4.4开始支持此参数,如:DESC或ASC", "page":"必填,第几页", "pageSize":"必填,每页多少条" } 返回结果: { "msg":"错误信息,成功时候为空", "code":"0成功1错误", "data":{ "pageSize":"每页多少条", "list":[ { "dateStr":"22:04:22", "sys":"cpu使用率,百分比", "hostname":"主机IP", "createTime":"创建时间,毫秒", "id":"1475467631493513216" } ], "pageNum":"当前第几页", "total":"总共多少条", "pages":"总共多少页" } }