第三方应用可以直接通过调用该接口,根据规则id、项目guid、公司guid等信息获取某规则近30次的巡检趋势。用于趋势图展示。
授权说明
需要授权 身份认证2.0
正式:https://zenith.fdcyun.com/v20/api/inspection/insdata/result/trend.svc
测试:https://planet-test.fdcyun.com/v20/api/inspection/insdata/result/trend.svc
x-token:xxxxx //调用服务云[认证接口]得到的token,未传输此头的请求无法获取数据
x-custid:xxxx //客户主数据GUID
Content-Type: application/json; charset=utf-8
{
"ProductId":1,//参考获取产品信息接口 必填
"RuleId":1,//规则id
"BuGuid":"",//公司GUID 可选
"ProjGuid":"",//项目guid 可选
}
成功返回,http状态码为 200
[
{"RowCount":0,"InsDate":"2018-05-31T00:00:00"},
{"RowCount":52,"InsDate":"2018-01-05T15:10:14"},
{"RowCount":0,"InsDate":"2018-01-04T15:10:14"},
{"RowCount":9,"InsDate":"2018-01-03T15:10:17"},
{"RowCount":10,"InsDate":"2018-01-02T15:10:15"},
{"RowCount":11,"InsDate":"2018-01-01T15:10:14"},
{"RowCount":12,"InsDate":"2017-12-31T15:10:14"},
……
]
失败返回,http状态码为 500
{ "Message": "应用ID不存在", "ExceptionType":"System.Exception", "xxx": "xxx" //后续扩展 }
其他http状态码说明
代码 | 说明 |
---|---|
200 | 请求成功 |
403 | 未授权 |
500 | 具体错误信息,如:没有产品信息 |