You need to enable JavaScript to run this app.
导航
查询报表信息与数据
最近更新时间:2025.07.16 15:56:14首次发布时间:2025.07.16 15:56:14
我的收藏
有用
有用
无用
无用

请求说明

Path:/openapi/v1/{app_id}/reports/{report_id}
Method: GET / POST
Content-type: application/json

请求参数

Path-parameters:

Parameter

Type

Description

Required

report_id

string

报表ID

true

注意

  • 私有化4.4版本后开始支持SQL自定义查询的结果。
  • 当报表类型为rich_text(富文本)或者embed(嵌入式)时,报表详情信息已包含在reports[].dsls中,无需再使用report_id来查询报表信息与数据,如果使用此种方式查询会报错。

Query-parameters:

Parameter

Type

Description

Required

count

int

数量limit,最大支持1000条。

false

filter_id

int

全局过滤器id,如果使用该id将忽略body中的global_filter节点(私有化4.4版本后支持)

false

Body:
当Http Method为POST时,可以使用body参数。

{
    "global_filter": {
        "param_filters": {},
        "profile_filters": [],
        "period": {},
        "property_logic": "and",
        "replace_info": null
    }
}

注意

  • 使用report api接口时,如果过滤条件param_filters中包含日期范围,日期范围以传入的为准。 但是如果设置了"granularity": “month” 时,会自动补齐当月的数据,例如,时间过滤条件设置为2024-01-01到2024-03-05,"granularity": “month” 时的返回结果为2024-01-01到2024-03-31的数据。
  • 如果您希望获取天级数据结果,您需要用"granularity": “day”并配合过滤条件来进行日期范围限制。

返回参数

Response:

{
        "code": 200,
        "message": "success"
        "data":  {
            "dsls": [{
                 "data": [{}],
                 "mp_scene": {},
                 "qr_codes": []
                }
            ],
        }
}

字段含义说明

Field

Type

Description

data.dsls[].data

JSON 对象数组

报表中的信息

data.dsls[].mp_scene

JSON 对象

场景信息

data.dsls[].qr_codes

数组

二维码信息

请求示例

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

# 例如,app_id= 165108 report_id= 6761676584756707854
res = bc.data_finder('/openapi/v1/165108/reports/{}'.format('6761676584756707854'), method='get', params={"count":30})
print(res.content)

返回示例

返回结果:
data.dsls[].data为报表中的数据
data.dsls[].mp_scene为场景信息
data.dsls[].qr_codes为二维码信息
Image
Image

参考:从前端配置获取全局过滤器配置

Image
Image