You need to enable JavaScript to run this app.
导航

查询服务接口

最近更新时间2023.12.04 17:35:50

首次发布时间2023.10.08 10:43:10

1. 分群规则校验接口

基本信息

生效版本1.20
功能描述查询服务圈选dsl校验
接口模块SelectionComponentApi
接口名称DslCheck
请求类型POST
权限校验不需要权限校验

请求参数

  • Query
名称数据类型是否必选描述
ApiActionString对应“基本信息”中的“接口名称”
ApiVersionString版本号: 2023-08-08

tenantCode

String

租户Code (请不要填写租户ID,获取方式详见附录)

  • Header
名称数据类型是否必选描述
AuthorizationString见《开发前必读》3.3中提到的签名
  • Body
名称数据类型是否必选描述

filter

Object

规则dsl,请参阅DSL编写规则

{
    "filters":
    [
        {
            "filters":
            [
                {
                    "tagId": 356,
                    "operator": "in",
                    "value":
                    [
                        "兴趣"
                    ]
                }
            ],
            "operator": "And"
        }
    ],
    "operator": "And"
}

请求样例

{
    "filter":
    {
        "filters":
        [
            {
                "filters":
                [
                    {
                        "tagId": 356,
                        "operator": "in",
                        "value":
                        [
                            "兴趣"
                        ]
                    }
                ],
                "operator": "And"
            }
        ],
        "operator": "And"
    }
}

响应样例
成功

{
    "data": true,
    "traceId": "64e0f7db-1278-4f0c-ac6d-195431988cd5",
    "code": 0
}

失败

{ 
  "data": "不支持当前filter,只支持分群,属性,标签",
  "code": 1030100148
}
2. 分群预估接口

基本信息

生效版本1.20
功能描述查询服务圈选预估
接口模块SelectionComponentApi
接口名称PreviewDSL
请求类型POST
权限校验需要数据权限校验(接口会根据用户名添加权限查询逻辑上去)

请求参数

  • Query
名称数据类型是否必选描述
ApiActionString对应“基本信息”中的“接口名称”
ApiVersionString版本号: 2023-08-08

tenantCode

String

租户Code (请不要填写租户ID,获取方式详见附录)

  • Header
名称数据类型是否必选描述
AuthorizationString见《开发前必读》3.3中提到的签名
x-userString用户名,用于鉴权
  • Body
名称数据类型是否必选描述

filter

Object

规则dsl,请参阅DSL编写规则

{
    "filters":
    [
        {
            "filters":
            [
                {
                    "tagId": 356,
                    "operator": "in",
                    "value":
                    [
                        "兴趣"
                    ]
                }
            ],
            "operator": "And"
        }
    ],
    "operator": "And"
}
sourceIdTypeIntbaseId的id

请求样例

{
    "filter":
    {
        "filters":
        [
            {
                "filters":
                [
                    {
                        "tagId": 356,
                        "operator": "in",
                        "value":
                        [
                            "兴趣"
                        ]
                    }
                ],
                "operator": "And"
            }
        ],
        "operator": "And"
    },
    "sourceIdType": 1
}

响应样例
成功

{
    "data": {
        "count": 0,
        "sql": " select base_id_0 as result from (    select BitMapCount('(0 & 1)')(idx, base_id_1) as base_id_0  from (                             ( select  toInt16(0) as idx,   BitMapExtract('(0~1)|2')(index, temp_id) as base_id_1  from (   select toInt16(0) as index,   base_id_2 as temp_id    from   ( select  BitMapColumnOr(id_map) as base_id_2  from (     select id_map,tag_value_double          from profile_tob.tag_bitmaps_did_cdp     where  p_date between '2023-08-03' and '2023-08-03'      and tag_type = 1     and id_type = 1     and tag_id = 5 ) where  ( toInt64(tag_value_double) = 0 )  )     union all   select toInt16(1) as index,   temp_id    from ( select   arrayToBitmapWithEncode(groupArray(toUInt64(assumeNotNull(id))), 'profile_tob', 'tag_bitmaps_did_cdp_local', 'id_map',1) as temp_id   from ( select id  from aeolus_label_realtime_result_db.aeolus_label_app_1_entity_type_user_kafka_unique where tag_id = 5 and p_date = '2023-08-04' )  )     union all   select toInt16(2) as index,   temp_id    from ( select   arrayToBitmapWithEncode(groupArray(toUInt64(assumeNotNull(id))), 'profile_tob', 'tag_bitmaps_did_cdp_local', 'id_map',1) as temp_id   from ( select id  from aeolus_label_realtime_result_db.aeolus_label_app_1_entity_type_user_kafka_unique where tag_id = 5 and p_date = '2023-08-04' and  ( tag_value_bigint = 0 ) )  )  )   )                          union all                         ( select  toInt16(1) as idx, BitMapColumnOr(id_map) as base_id_1  from (     select id_map,tag_value          from profile_tob.tag_bitmaps_did_cdp     where  p_date = '1970-01-01'      and tag_type = 1     and id_type = 1     and tag_id = 1 ) where  tag_value in  ('兴趣')   )                          )       settings distributed_perfect_shard=1, prefer_localhost_replica = 1, load_balancing = 'in_order'  ) "
    },
    "traceId": "06d8fe01-87f0-43d6-8349-908d93753b25",
    "code": 0
}

失败

{ 
  "data": "ERROR",
  "code": -1
}