You need to enable JavaScript to run this app.
导航
月粒度用量统计
最近更新时间:2024.06.30 18:36:03首次发布时间:2024.06.30 18:36:03

请求说明

Path:/openapi/v1/usage_amount
Method: POST
Content-type: application/json

请求参数

Body: 参考公共参数说明

返回参数

Response:

{
    "code": 200,
    "message": "success",
    "data": {
        "usage_amount": {
            "${app_id}": {
                "month_usage_amount": {
                    "{month}": {
                        "days": xx,
                        "mau": xx,
                        "dau": xxx,
                        "events_num": xxx
                    }
                },
                "app_info": {
                    "app_name": xx,
                    "app_en_name": xx
                }
            }
        }
    }
}

字段含义说明
数据格式为data.usage_amount.${app_id}.month_usage_amount.${month}: {具体的内容}
mount的格式为 yyyyMM

Field

Type

Description

days

int

天数

mau

int

MAU的值

dau

int

DAU的值

events_num

int

事件量统计

请求示例

bc 为创建的 RangersClient, 其初始化请参考使用说明, 各语言的 SDK 都提供了类似的接口
调用(Python):

body={
    "org_id": null,
    "app_ids": [164314],
    "start_time": 1643644800, # 2022年2月1日
    "end_time": 1645977600 # 2022年2月28日
}
res = bc.data_finder('/openapi/v1/usage_amount/daily', body={body})
print(res.content)

返回示例

返回结果:

{
    "code": 200,
    "message": "success",
    "data": {
        "usage_amount": {
            "164314": {
                "month_usage_amount": {
                    "202202": {
                        "days": 28,
                        "mau": 100000,
                        "dau": 100,
                        "events_num": 100000000
                    }
                },
                 "app_info": {
                    "app_name": "rangers_164314_ceshi",
                    "app_en_name": "rangers_164314_ceshi"
                }
            }
        }
    }
}