获取图表列表接口
接口说明: 获取智数图表列表接口。
请求方式:POST(HTTPS)
请求地址:https://api.xinrenxinshi.com/v5/statistic/chart/list
请求Header:
key | value |
---|---|
access_token | 获取的access_token的实际值 |
Query参数:
key | value |
---|---|
sign | 签名值 |
Body参数:
参数 | 类型 | 必传(Y/N) | 说明 |
---|---|---|---|
dashboardId | Integer | Y | 看板ID |
timestamp | Long | Y | 请求时间戳(精确到毫秒) |
返回结果:
参数 | 类型 | 必传(Y/N) | 说明 |
---|---|---|---|
errcode | Integer | Y | 0成功,其他失败 |
errmsg | String | Y | 结果描述 |
data | List<StatChartInfo> | Y | 图标列表 |
StatChartInfo:
参数 | 类型 | 必传(Y/N) | 说明 |
---|---|---|---|
chartId | Integer | Y | 图表ID |
chartTitle | String | Y | 图表标题 |
dashboardId | Integer | Y | 看板ID |
chartDesc | String | Y | 图表描述 |
chartType | Integer | Y | 图表类型:1=折线趋势图,2=柱形图,3=排名图,4=占比分析图,5=表格,6=数字图,7=横向堆积图,8=纵堆积图,9=折柱混合图,10=排名图,11=仪表盘 |
请求示例(HTTPS):
https://api.xinrenxinshi.com/v5/statistic/chart/list?sign=Rorz2AZsCp%2BpikYQM58sCDSwuh0%3D
请求Body示例:
{
"dashboardId": 1922,
"timestamp": 1606725352952
}
SDK请求示例(java):
StatisticsChartRequest request = new StatisticsChartRequest(access_token());
request.setDashboardId(1922);
OpenapiResponse<List<StatChartInfo>> statChartList = XrxsStatisticService.getStatChartList(request);
响应示例:
{
"errcode": 0,
"errmsg": "成功",
"data": [{
"chartId": 1258,
"chartTitle": "在职人数",
"dashboardId": 1922,
"chartDesc": null,
"chartType": 6
}, {
"chartId": 1259,
"chartTitle": "首月离职率",
"dashboardId": 1922,
"chartDesc": "[\"一个月内离开组织的员工数/新员工总数\"]",
"chartType": 6
}, {
"chartId": 1260,
"chartTitle": "首年离职率",
"dashboardId": 1922,
"chartDesc": "[\"一年内离职的员工人数/新员工总数\"]",
"chartType": 6
}]
}