2019-08-14 14:31:41 +08:00
2019-08-14 14:31:41 +08:00
2019-08-14 14:31:41 +08:00
2019-08-13 14:32:36 +08:00
2019-08-14 11:21:29 +08:00
2019-08-14 14:31:41 +08:00

数据展示接口

1、返回可用的数据方法按gameid排查及返回方法的字段定义

接口地址

http://154.8.214.202:5015/interface/company

返回格式json
请求方式get
请求示范

http://154.8.214.202:5015/interface/company?status=0

请求参数说明
名称 类型 必填 说明
gameid string 查询的游戏ID
channelid string 默认为6001微信
返回参数说明
名称 类型 必填 说明
gamename string 游戏中文名
methods String 方法名
methods_name String 方法显示名
result json 方法明细字段名称及显示名

2、按方法和日期返回某天的数据

接口地址

http://154.8.214.202:5015/interface/company

返回格式json
请求方式get
请求示范

http://154.8.214.202:5015/interface/company?status=0

请求参数说明
名称 类型 必填 说明
gameid string 查询的游戏ID
channelid string 查询的平台ID默认为6001
methods string 默认为6001微信
date datetime 查询的报表数据格式为“2019-08-12”
返回参数说明
名称 类型 必填 说明
gamename string 游戏中文名
methods String 方法名
methods_name String 方法显示名
返回示例

{ "code": 200, "message": [ { "appid": "BKadJbmZ", "appkey": "undefined", "contact": "pt", "id": "1001", "name": "kings", "status": 0, "tel": "1234", "user": "None" } ] }

3、按方法和日期返回某段时间的数据

接口地址

http://154.8.214.202:5015/interface/company

返回格式json
请求方式get
请求示范
请求参数说明
名称 类型 必填 说明
gameid int 游戏ID
channelid int 渠道ID
ad_channelid string 广告上报的关键词
method string 查询数据类型
time_partice int 查询时间颗粒0=1分钟1=5分钟2=1小时
time_begin datetime 开始时间
time_end datetime 结束时间

select time,num from user_online where env='prod' and gameid='1013' and time >'2019-08-01 01:00:00' and time <'2019-08-03 01:00:00' limit 10

在influxdb中按关键词筛选需要的数据数据按以下结构返回

{ "errcode": 0, "errmsg": "", "message": { "totoal": 2, "result": [ {

“2019-08-01 01:00:00”:100,

“2019-08-01 02:00:00”:120, } ] } }

如查询提供的是错误的方法名则返回错误代码501

如查询结果为空则返回状态码200内容为空

Description
No description provided
Readme 533 KiB
Languages
Python 95.4%
HTML 4.6%