You need to enable JavaScript to run this app.
导航
导出标签
最近更新时间:2024.06.30 18:36:03首次发布时间:2024.06.30 18:36:03

请求说明

Path:/openapi/v1/app/{app_id}/tag/{tag_name}/download
Method: POST
Content-type: application/json

请求参数

Path-parameters: 参考公共参数即可
Body:

{
    "type": "user",
    "condition": {
        "property_operation": "is_not_null",
        "snapshot": {
            "type": "day",
            "day": "2022-05-05"
        }
    },
    "period": {
        "timezone": "Asia/Shanghai"
    }
}

参数

类型

是否必选

示例值

描述

type

string

user

枚举值包括:

  • 值为"distribution"下载概况
  • 值为"user"下载详情

condition

object

见下方请求示例

选择条件

condition.property_operation

string

运算条件

condition.snapshot

object

过滤日期

period

object

详见开发者指南->数据开放->OpenAPI->查询API->5.2.2periods字段

返回参数

Response:

二进制数据流

请求示例

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

method = 'POST'
service_url = '/datatag/openapi/v1/app/164314/tag/tag_testxxxx_wyx/download'
body = {
    "type": "user",
    "condition": {
        "property_operation": "is_not_null",
        "snapshot": {
            "type": "day",
            "day": "2022-05-05"
        }
    },
    "period": {
        "timezone": "Asia/Shanghai"
    }
}

resp = bc.request(method=method, service_url=service_url, body=body)
print(resp.content.decode('utf-8'))

返回示例

返回结果:(二进制数据流, 以下只显示前 5 行数据)

user_id,stat_standard_id,device_id,tag_value
2514296972,6866a6a2-5d06-4594-a48e-fda240d3d9ba,444644287588669,标签值1
25241114489161081,0326b33f-0c8c-4d9f-87ae-a33e25ed1528,3312170353296040,标签值1
925791154365952304,ce85d5ad-cf51-40f9-9228-b3ff903655e2,585382263260008,标签值1
43294216333,686a7f08-4860-41d3-947d-4f90cf3bdbf6,3751957918129043,标签值1
922291870168956341,0d46fbd6-c068-484a-a5de-72a2ad39b4c4,22433244645320,标签值1