Path:/openapi/v1/app/{app_id}/tag/{tag_name}/result
Method: GET
Path-parameters: 参考公共参数即可
Response:
{ "code": 200, "message": "success", "data": { "app_id": 164314, "tag_id": 240, "tag_name": "tag_testxxxx_wyx", "status": "success", "calculate_result": { "total": 28762, "details": [ { "name": "标签值1", "count": 28762, "percent": 1.0, "pdate": "2022-05-05" } ], "trace_id": "12b35322-861f-4172-9d1b-5b5e9d8b5d7b", "calculate_date": 1651728069000, "timezone": "Asia/Shanghai", "tag_status": "success", "begin_at": 1651728069000, "end_at": 1651728092000, "pdate": "2022-05-05", "p_date": "2022-05-05" }, "calculate_date": 1651728069000, "begin_at": 1651728069000, "end_at": 1651728092000, "timezone": "Asia/Shanghai", "pdate": "2022-05-05" }, "total_execute_time": null }
字段含义说明
data 返回的是一个 JSON object, 针对关键字段进行说明
Field | Type | Description |
---|---|---|
app_id | int | 应用id |
tag_id | int | 标签id |
tag_name | string | 标签名称 |
status | string | 计算状态 |
calculate_result | object | 计算结果 |
calculate_result.total | int | 数据总行数 |
calculate_result.details | object | 计算结果详情 |
calculate_result.details.name | string | 标签值 |
calculate_result.details.count | int | 属于该标签值的数据行数 |
calculate_result.details.percent | double | 属于该标签值的数据行数在数据总行数的占比 |
calculate_result.details.pdate | string | 已废弃,标签计算开始的时间戳 |
calculate_date | int | 已废弃,标签计算开始的时间戳 |
begin_at | int | 已废弃,标签计算开始的时间戳(同calculate_date) |
end_at | int | 已废弃,标签计算结束的时间戳 |
timezone | string | 时区 |
pdate | string | 已废弃,最新结果的计算日期 |
p_date | string | 最新结果的计算日期(建议使用) |
bc
为创建的 RangersClient, 其初始化请参考使用说明, 各语言的 SDK 都提供了类似的接口
调用(Python)::
method = 'GET' service_url = '/datatag/openapi/v1/app/164314/tag/tag_testxxxx_wyx/result' resp = bc.request(method=method, service_url=service_url) print(resp.content.decode('utf-8'))
返回结果:
{ "code": 200, "message": "success", "data": { "app_id": 164314, "tag_id": 240, "tag_name": "tag_testxxxx_wyx", "status": "success", "calculate_result": { "total": 28762, "details": [ { "name": "标签值1", "count": 28762, "percent": 1.0, "pdate": "2022-05-05" } ], "trace_id": "12b35322-861f-4172-9d1b-5b5e9d8b5d7b", "calculate_date": 1651728069000, "timezone": "Asia/Shanghai", "tag_status": "success", "begin_at": 1651728069000, "end_at": 1651728092000, "pdate": "2022-05-05", "p_date": "2022-05-05" }, "calculate_date": 1651728069000, "begin_at": 1651728069000, "end_at": 1651728092000, "timezone": "Asia/Shanghai", "pdate": "2022-05-05" }, "total_execute_time": null }