接口路径(新):http://api.okayapi.com/api/App/Statistics/GetDailyRequest
接口路径(旧):http://api.okayapi.com/?s=App.Statistics.GetDailyRequest
接口描述: 统计一段日期内,每天的接口请求总量
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
start_date | Date | Required | 开始日期,格式:YYYY-MM-DD,如:2018-12-20 | ||
end_date | Date | Required | 结束日期,格式:YYYY-MM-DD,如:2018-12-21 | ||
need_service | String | Optaion | 需要统计的某个接口服务,默认为空表示统计全部接口服务,可指定特定接口,例如:needService=App.Hello.World |
请求:
{OKAYAPI_API_HOST}/?s=App.Statistics.GetDailyRequest&start_date=2018-12-01&end_date=2018-12-21&app_key={你的app_key}&sign={动态签名}
返回:
{
"ret": 200,
"data": {
"err_code": 0,
"err_msg": "",
"items": [
{
"date": "2018-12-01",
"times": 347
},
{
"date": "2018-12-02",
"times": 220
},
{
"date": "2018-12-03",
"times": 265
},
// 中间略 ... ...
{
"date": "2018-12-21",
"times": 106
}
],
"total": 3554
},
"msg": "当前请求接口:App.Statistics.GetDailyRequest"
}
<?php
// 引入文件
require_once dirname(__FILE__) . '/OkayApiClient.php';
// 调用小白开放接口
$rs = OkayApiClient::request('App.Statistics.GetDailyRequest',array('start_date'=>'2019-2-10','end_date'=>'2019-2-12'));
// 输出结果
print_r($rs);
/*
Array
(
[ret] => 200
[data] => Array
(
[err_code] => 0
[err_msg] =>
[items] => Array
(
[0] => Array ( [date] => 2019-02-10 [times] => 30 )
[1] => Array ( [date] => 2019-02-11 [times] => 72 )
[2] => Array ( [date] => 2019-02-12 [times] => 48 )
)
[total] => 150
)
[msg] => 小白开放接口:App.Statistics.GetDailyRequest
)
*/
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0表示成功,正数表示业务失败场景,负数表示系统失败场景 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
items | Array | 统计列表 |
items[].date | String | 日期,格式:YYYY-MM-DD,如:2018-12-01 |
items[].times | Int | 接口请求次数 |
total | Int | 当前日期内的总请求次数 |
接口路径(新):http://api.okayapi.com/api/App/Statistics/GetDailyRegister
接口路径(旧):http://api.okayapi.com/?s=App.Statistics.GetDailyRegister
接口描述: 统计一段时间内,会员每天注册的情况
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
start_date | Date | Required | 开始日期,格式:YYYY-MM-DD,如:2018-12-20 | ||
end_date | Date | Required | 结束日期,格式:YYYY-MM-DD,如:2018-12-21 |
<?php
// 引入文件
require_once dirname(__FILE__) . '/OkayApiClient.php';
// 调用小白开放接口
$rs = OkayApiClient::request('App.Statistics.GetDailyRegister',array('start_date'=>'2019-2-10','end_date'=>'2019-2-12'));
// 输出结果
print_r($rs);
/*
Array
(
[ret] => 200
[data] => Array
(
[err_code] => 0
[err_msg] =>
[items] => Array
(
[0] => Array ( [date] => 2019-02-10 [reg_num] => 2 )
[1] => Array ( [date] => 2019-02-11 [reg_num] => 0 )
[2] => Array ( [date] => 2019-02-12 [reg_num] => 1 )
)
[total] => 3
)
[msg] => 小白开放接口:App.Statistics.GetDailyRegister
)
*/
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0表示成功,正数表示业务失败场景,负数表示系统失败场景 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
items | Array | 统计列表 |
items[].date | String | 日期,格式:YYYY-MM-DD,如:2018-12-01 |
items[].reg_num | Int | 当天注册人数 |
total | Int | 当前日期内的总请求次数 |
接口路径(新):http://api.okayapi.com/api/App/Statistics/GetDailyLoginReport
接口路径(旧):http://api.okayapi.com/?s=App.Statistics.GetDailyLoginReport
接口描述: 统计一段时间内,会员每天登录的情况,包括登录总次数、成功登录次数、失败登录次数。
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
start_date | Date | Required | 开始日期,格式:YYYY-MM-DD,如:2018-12-20 | ||
end_date | Date | Required | 结束日期,格式:YYYY-MM-DD,如:2018-12-21 |
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0表示成功,正数表示业务失败场景,负数表示系统失败场景 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
items | Array | 统计列表 |
items[].date | String | 日期,格式:YYYY-MM-DD,如:2018-12-01 |
items[].total_times | Int | 总登录次数,没有统计时,填充0 |
items[].success_times | Int | 成功登录次数,没有统计时,填充0 |
items[].fail_times | Int | 失败登录次数,没有统计时,填充0 |
接口路径(新):http://api.okayapi.com/api/App/Statistics/GetRegisterSnapshot
接口路径(旧):http://api.okayapi.com/?s=App.Statistics.GetRegisterSnapshot
接口描述: 统计当前会员注册的概况,获取已注册会员总人数和最大可注册会员人数。
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY |
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0表示成功,正数表示业务失败场景,负数表示系统失败场景 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
cur_register_total | Int | 已注册会员总人数 |
max_register_total | Int | 最大可注册会员人数 |
接口路径(新):http://api.okayapi.com/api/App/Statistics/Report
接口路径(旧):http://api.okayapi.com/?s=App.Statistics.Report
接口描述: 可以提供给客户端(安卓、iOS、应用、桌面应用、网站、脚本等)上报请求,上报后可以和其他接口一样在果创云-流量分析查看可视化数据统计报表。包括IP分析、省份分析、会员分析、UA分析、客户端浏览器分析等。
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
ip | String | Optaion | MAX: 15 | 客户端IP,不传时服务器自动获取当前请求IP | |
ua | String | Optaion | MAX: 100 | 客户端User-Agent,不传时务器自动获取当前的User-Agent |
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0表示成功,正数表示业务失败场景,负数表示系统失败场景 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
接口路径(新):http://api.okayapi.com/api/App/Statistics/MyProduct
接口路径(旧):http://api.okayapi.com/?s=App.Statistics.MyProduct
接口描述: 查询我的剩余接口流量、套餐有效期等套餐信息
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY |
请求:
{你的接口域名}{OKAYAPI_API_HOST}/?s=App.Statistics.MyProduct&app_key={你的app_key}&sign={动态签名}
返回:
{
"ret": 200,
"data": {
"err_code": 0,
"err_msg": "",
"expire_date": "2051-09-13",
"max_request_times_month": 90000,
"total_request_times_month": 609552,
"spend_request_times_month": 109393,
"more_api_times": 21009983,
"left_request_times_month": 20490431
},
"msg": "",
"_t": 1680159576,
"_auth": "adb61ad90bd6fb1ce89891bb7202e609"
}
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0表示成功,正数表示业务失败场景,负数表示系统失败场景 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
expire_date | String | 有效日期,例如 2051-09-13 |
max_request_times_month | Int | 套餐固定每个月最大的接口请求上限 |
total_request_times_month | Int | 本月总接口流量 |
spend_request_times_month | Int | 本月已消耗的接口流量包数量 |
more_api_times | Int | 接口流量包当前剩余的总数 |
left_request_times_month | Int | 本月剩余的接口流量 |
Power by OkayAPI.com Contact us (WA: okayapi OR Email: chanzonghuang@gmail.com).
Timezone: America/New_York May/09/2025 07:26:17