获取看板详情接口

接口说明: 获取智数看板详情接口。

请求方式:POST(HTTPS)
请求地址:https://api.xinrenxinshi.com/v5/statistic/chart/data
请求Header:

key value
access_token 获取的access_token的实际值

Query参数:

key value
sign 签名值

Body参数:

参数 类型 必传(Y/N) 说明
chartId Integer Y 看板ID
dateFilterType Integer N 筛选类型:0-默认(不传则默认),1-区间
dateLeftValue String N 开始年月(YYYYMM) 比如 202001
dateRightValue String N 结束年月(YYYYMM) 比如 202001
timestamp Long Y 请求时间戳(精确到毫秒)

返回结果:

参数 类型 必传(Y/N) 说明
errcode Integer Y 0成功,其他失败
errmsg String Y 结果描述
data StatChartDetailInfo Y 图标详情

StatChartDetailInfo:

参数 类型 必传(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=仪表盘
chartData ChartDataDO Y 图表数据
chartDataDetail List<List<String>> Y 二位数组包含 表头(占比图包含每个占比例)

ChartDataDO:

参数 类型 必传(Y/N) 说明
time String Y 数据时间段
unit List<String> Y 指标的单位
mutiDimension List<List<String>> Y 多维度的纬度名称列表
dimension List<String> Y 单维度的维度名称列表
metric List<String> Y 指标名称列表
data List<List<String>> Y 图表数据,未包含表头(占比图包含每个占比列)

请求示例(HTTPS):

https://api.xinrenxinshi.com/v5/statistic/chart/data?sign=Rorz2AZsCp%2BpikYQM58sCDSwuh0%3D

请求Body示例:

{
  "dashboardId": 1922,
  "chartId": 1258,
  "timestamp": 1606725352952
}

SDK请求示例(java):

StatisticsChartDetailRequest request = new StatisticsChartDetailRequest(access_token());
request.setDashboardId(1922);
request.setChartId(1258);
OpenapiResponse<StatChartDetailInfo> statChartDetailInfo = XrxsStatisticService.getStatChartData(request);

响应示例:

{
  "errcode": 0,
  "errmsg": "成功",
  "data": {
    "chartId": 1258,
    "dashboardId": 1922,
    "chartTitle": "在职人数",
    "chartType": 6,
    "chartDesc": null,
    "chartData": {
      "time": "2021/10",
      "unit": ["人"],
      "mutiDimension": [],
      "dimension": [],
      "metric": ["在职人数"],
      "data": [
        ["291"]
      ]
    },
    "chartDataDetail": [
      ["在职人数"],
      ["291"]
    ]
  }
}
2024 © 企家有道网络技术(北京)有限公司版权所有@京ICP备15035315号 all right reserved,powered by Gitbookupdate by: 2024-01-15 15:26:15

results matching ""

    No results matching ""