拉取统计规则的触发记录
请求方式
GET
请求地址
请求参数
示例
说明
参数 | 类型 | 必须 | 说明 |
app_id | string | 是 | 企微中台应用 id |
start_time | uint64 | 否 | 拉取起始时间,毫秒时间戳,默认为拉取近 3 天的触发记录数据,与拉取结束时间间隔不能超过 3 天 |
end_time | uint64 | 否 | 拉取结束时间,毫秒时间戳 |
chat_id | string | 否 | 企微中台聊天 id |
data_type | int | 否 | 数据类型:0-所有(默认),1-员工,2-客户 |
asc | bool | 否 | 是否按发送时间正序,默认为倒序 |
page_size | uint32 | 否 | 每页记录数,默认为 10,不超过 1000 |
cursor | string | 否 | 游标,开始拉取时为空 |
返回参数
示例
说明
参数 | 类型 | 说明 |
encrypted | string | 加密的触发记录列表,解密方式与企微回调信息的解密方式 (opens new window)一致,加解密使用的 key 是对应企业的会话存档能力的回调 encoding_aes_key。解密后得到的是对象数组 json 字符串 |
next_cursor | string | 下一页游标,没有更多数据时为空 |
encrypted 解密后的结构:
参数 | 类型 | 说明 |
app_id | string | 企微中台应用 id |
chat_id | string | 企微中台聊天 id |
chat_record_id | string | 企微中台聊天消息 id |
classification_id | string | 触发的统计规则分类 id |
classification_name | string | 触发的统计规则分类名称 |
content | string | 触发记录对应的企微文本消息内容 |
e_id | string | 企微中台企业 id |
from_user_id | string | 发送者 id,企微员工 id 或外部联系人 id |
from_user_name | string | 发送者名称 |
hit_key_word | string | 命中的关键词 |
msg_id | string | 触发记录对应的企微消息 id |
msg_time | uint64 | 触发记录对应的企微消息发送的毫秒时间戳 |
projects.organ_proj_id | string | 触发记录归属的项目 id |
projects.organ_proj_name | string | 触发记录归属的项目名称 |
record_id | string | 触发记录 id |
rule_id | string | 触发的统计规则 id |
rule_name | string | 触发的统计规则名称 |
to_user_id | string | 接受者 id,to_user_type=1 时为企微员工 id 或外部联系人 id,to_user_type=2 时为企微群聊 id |
to_user_name | string | 接受者名称 |
to_user_type | int | 聊天类型:1-单聊,2-群聊 |