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

回调接口

最近更新时间2023.11.10 14:14:18

首次发布时间2022.08.23 18:39:48

概述

本文档提供内容管理平台的火山回调接口,支持内容通用推送、个性化推送,以及内容关联标签变更、专题关联标签变更、标签树元数据变更、分发任务运营规则变更事件的主动回调。

调前准备
  1. 接口配置
    详见:推送配置
请求方式
POST  application/json
签名校验

内容管理平台在HTTP/HTTPS回调时增加特定签名头,以便消息接收服务端进行签名认证,可以用于防止非法请求或无效请求。

鉴权参数

参数描述
timestampunix时间戳,单位:秒。为保证安全,与当前时间戳绝对值不要超过3600s。
从请求头中获取,键为:X-Cms-Timestamp
nonce请求随机串。
从请求头中获取,键为:X-Cms-Nonce
signature签名字符串。
从请求头中获取,键为:X-Cms-Signature
payload业务数据。请求体body字节流。
secure_key鉴权密钥。从 “控制台-高级管理-回调设置” 中可以查看鉴权密钥

签名步骤

  1. 将 timestamp、nonce 和 payload 依次进行拼接;
  2. 使用 secure_key 对上述拼接的字符串进行 hmac sha256 加密,然后转成十六进制字符串 ;
  3. 得到加密后的字符串可与 signature 对比,标识该请求来源于内容管理平台。

签名示例

package main

import (
    "crypto/hmac"
    "crypto/sha256"
    "encoding/hex"
    "fmt"
)

func main() {
    timestamp := "1657017150"
    
    nonce := "3218760"
    
    payload := "{\"EventType\": \"push_task\",\"EventTime\": \"2022-07-05T18:32:30+08:00\",\"Version\": \"1.0\",\"Data\": {\"TaskName\": \"测试任务\",\"TaskId\": 7114859245769819692,\"GroupId\": 1736502630758487,\"GenerateType\": \"source_id2\",\"SourceName\": \"source_id2\",\"PushTitle\": \"测试标题\",\"PushAbstract\": \"测试摘要\",\"ExpectExecuteTime\": 1656560797,\"TargetPeople\": \"all\",\"TargetAppId\": 229586,\"TargetAppName\": \"cms测试\"}}"
    
    data := timestamp + nonce + payload
    
    secure_key := "mysecret"
    
    h := hmac.New(sha256.New, []byte(secure_key))
    
    h.Write([]byte(data))
    
    genSignature := hex.EncodeToString(h.Sum(nil))

    fmt.Println("genSignature: " + genSignature)
}
    
    
请求参数
参数类型说明

EventType

string

推送类型。
push_task:通用推送
push_indi_task:个性化推送
group_tag_change:内容关联标签变更
topic_tag_change:专题关联标签变更
tag_tree_change:标签树元数据变更
distribute_task_rule_change:分发任务运营规则变更
audit_task_change:质检任务数据变更
audit_retrace_change:质检回查数据变更
group_status_change:内容状态变更
topic_status_change:专题状态变更
topic_info_change:专题内容变更

EventTimestring事件产生时间,格式 RFC3339,如:2022-08-10T10:29:16+08:00
Versionstring版本号
BizPrimaryKeystring任务ID,可以在控制台查看回调记录

Data

object

具体格式根据 EventType 而定。
push_task:通用推送,对应 PushTaskData
push_indi_task:个性化推送,对应 PushIndiTaskData
group_tag_change:内容关联标签变更,对应 GroupTagChangeData
topic_tag_change:专题关联标签变更,对应 GroupTagChangeData
tag_tree_change:标签树元数据变更,对应 TagTreeChangeData
distribute_task_rule_change:分发任务运营规则变更,对应 DistributeTaskRuleChangeData
audit_task_change: 质检任务数据变更,对应AuditTaskChangeData
audit_retrace_change:质检回查数据变更,对应AuditRetraceChangeData
group_status_change:内容状态变更,对应GroupStatusChangeData
topic_status_change:专题状态变更,对应TopicStatusChangeData
topic_info_change:专题内容变更,对应TopicInfoChangeData

PushTaskData

通用推送任务的数据格式。

参数类型说明
TaskIdint任务ID
TaskNamestring任务名称
GroupIdint内容ID
GroupOpenIdstring内容OpenId
GenerateTypestring内容来源标识
SourceNamestring内容来源名称
PushTitlestring推送标题
PushAbstractstring推送摘要
ExpectExecuteTimeint推送时间,unix时间戳,单位:秒
TargetPeoplestring推送模式。all:通用推送
TargetAppIdint推送应用ID
TargetAppNamestring推送应用名称
IsTestDatabool是否是测试数据

PushIndiTaskData

个性化推送任务的数据格式。

参数类型说明
TaskIdint任务ID
TaskVersionint任务版本号
TaskNamestring任务名称
TargetAppIdint推送应用ID
TargetAppNamestring推送应用名称
PushTimeint推送时间,unix时间戳,单位:秒
PushCountint推送数量
PushItemstring推送内容链接,csv文件,格式如下
IsTestDatabool是否是测试数据

PushItem csv 文件格式:

task_id,task_version,uniq_user_id,group_id,group_open_id,push_title,push_abstract,generate_type,source_name,
178123,421321,111,12312341,341,推送标题,推送摘要,来源标识,来源名称,

csv文件头各字段含义

字段说明
task_id任务ID
task_version任务版本号
uniq_user_id用户ID
group_id文章ID
group_open_id文章OpenId
push_title推送标题
push_abstract推送摘要
generate_type来源标识
source_name来源名称

GroupTagChangeData

内容关联标签变更和专题关联标签变更数据格式。

参数
类型
说明
ChangeTags
list<TagChangeData>
变更的标签
TagList
list<TagData>
文章或专题当前标签
ObjectId
string
文章ID或专题ID
ObjectOpenId
string
文章OpenId或专题OpenId

TagTreeChangeData

标签树元数据变更。

参数
类型
说明
ChangeTags
list<TagChangeData>
变更的标签

DistributeTaskRuleChangeData

分发任务运营规则变更。

参数
类型
说明
DistributeTaskId
string
分发任务ID
DistributeTaskName
string
分发任务名称
DistributeRule
DistributeRuleData
分发任务运营规则

AuditTaskChangeData

质检任务数据变更。

参数
类型
说明
GroupId
string
文章ID
GroupOpenId
string
文章openId
GenerateType
string
内容源标识
AuthorStrategyHit
string
作者黑白名单命中信息,只有命中黑白名单会返回
BlackList: 命中黑名单;
WhiteList:命中白名单
TaskInfo
AuditTaskInfo
任务信息,若是命中黑白名单的流程,不存在任务信息

AuditRetraceChangeData

质检回查处理。

参数
类型
说明
GroupId
string
文章ID
GroupOpenId
string
文章openId
GenerateType
string
内容源标识
TaskInfo
AuditRetraceTaskInfo
回查任务信息
TaskResult
string
回查处理;
  • Approve:上线
  • Reject:下线

GroupStatusChangeData

内容状态变更数据格式。

参数类型说明
GroupIdstring内容ID
GroupOpenIdstring内容openId
FromStatusstring变更前状态,枚举请见: “内容状态枚举”
ToStatusstring变更后状态,枚举请见: “内容状态枚举”
GenerateTypestring内容来源

ChangeTime

string

变更时间 例子: 2023-01-01 10:00:00

内容状态枚举

枚举值说明
init初始化
import导入中
import_failed导入失败
import_timeout导入超时
online已上线
wait_audit等待审核
reject_audit审核驳回
offline已下线
delete已删除

TopicStatusChangeData

专题状态变更数据格式。

参数类型说明
TopicIdstring专题ID
TaskOpenIdstring专题openId
FromStatusstring变更前状态,枚举请见: “专题状态枚举”
ToStatusstring变更后状态,枚举请见: “专题状态枚举”

TopicSource

string

专题来源
枚举值:

  • api:外部引入
  • cms:自建专题
  • toutiao_api:火山同步

ChangeTimestring变更时间 例子: 2023-01-01 10:00:00

专题状态枚举

枚举值说明
offline下线
online上线
syncing同步中
delete已删除

TopicInfoChangeData

专题内容变更数据格式。

参数
类型
说明
TopicId
string
专题ID
TaskOpenId
string
专题openId
TopicStatus
string
专题状态,枚举请见: “专题状态枚举”
TopicSource
string
专题来源
枚举值:
  • api:外部引入
  • cms:自建专题
  • toutiao_api:火山同步
ChangeTime
string
变更时间 例子: 2023-01-01 10:00:00
BasicInfoChange
BasicInfoChange
基本信息变更
LandingPageUrlChange
LandingPageUrlChange
详情页链接变更
响应参数

响应数据为 json 格式,各字段含义如下:

参数类型说明
retint响应状态码。0:成功,非0:失败
msgstring响应结果说明。success:成功;失败的时候,在msg中提供相应的失败原因
调用示例

通用推送

请求示例

POST / HTTP/1.1
Host: xxx.xxx.xxx
X-Cms-Timestamp: 1657017150
X-Cms-Nonce: 3218760
X-Cms-Signature: 3ff837202591cde49e4212f511f1ba253cf634357eba567d39fb446652dfc55e
Content-Type: application/json

{
    "EventType": "push_task",
    "EventTime": "2022-07-05T18:32:30+08:00",
    "Version": "1.0",
    "Data": {
        "TaskName": "测试任务",
        "TaskId": 7114859245769819692,
        "GroupId": 1736502630758487,
        "GenerateType": "source_id2",
        "SourceName": "source_id2",
        "PushTitle": "测试标题",
        "PushAbstract": "测试摘要",
        "ExpectExecuteTime": 1656560797,
        "TargetPeople": "all",
        "TargetAppId": 229586,
        "TargetAppName": "cms测试"
    }
}

响应示例

{
    "ret":0,
    "msg":"success"
}

个性化推送

请求示例

POST / HTTP/1.1
Host: xxx.xxx.xxx
X-Cms-Timestamp: 1666346544
X-Cms-Nonce: 6208626
X-Cms-Signature: 7d2681c9fd6b835770b6aac708c5a5702f94ecbf818b18bf910de4e8cb69c260
Content-Type: application/json

{
    "EventType": "push_indi_task",
    "EventTime": "2022-10-21T18:02:24+08:00",
    "Version": "1.0",
    "Data": {
        "TaskId": 7156892213677606444,
        "TaskVersion": 7156892213677639212,
        "TaskName": "test task",
        "TargetAppId": 229586,
        "TargetAppName": "test app",
        "PushTime": 1666346401,
        "PushCount": 10000,
        "PushItem": "https://lf-volccms-sign.onewsstatic.com/test.csv",
        "IsTestData": false,
    }
}

响应示例

{
    "ret":0,
    "msg":"success"
}

内容关联标签变更

请求示例

POST / HTTP/1.1
Host: xxx.xxx.xxx
X-Cms-Timestamp: 1683190242
X-Cms-Nonce: 6998626
X-Cms-Signature: 7d2681c9fd6b800770b6aac708c5a5702f94ecbf818b18bf910de4e8cb69c260
Content-Type: application/json

{
  "EventType": "group_tag_change",
  "EventTime": "2023-05-04T16:50:42+08:00",
  "Version": "1.0",
  "BizPrimaryKey": "1764225119429645_1683190241189",
  "Data": {
    "ObjectId": "1764225119429645",
    "ObjectOpenId": "5119429",
    "TagList": [
      {
        "TagIdentity": "高级",
        "TagName": "高级-修改",
        "TagLevel": 1,
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1756254139754510"
      },
      {
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1756254146364430",
        "TagIdentity": "中级",
        "TagName": "中级-修改",
        "TagLevel": 1
      },
      {
        "TagIdentity": "低级",
        "TagName": "低级",
        "TagLevel": 1,
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1756254154142733"
      },
      {
        "TagIdentity": "custom.tag1",
        "TagName": "tag1",
        "TagLevel": 1,
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1757436527251463"
      },
      {
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1757880544795656",
        "TagIdentity": "testfinder",
        "TagName": "testfinder",
        "TagLevel": 1,
        "TagType": "custom"
      },
      {
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1757882181023752",
        "TagIdentity": "1",
        "TagName": "12",
        "TagLevel": 1
      },
      {
        "TagId": "1758641991276552",
        "TagIdentity": "custom.测试",
        "TagName": "测试",
        "TagLevel": 1,
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": ""
      },
      {
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1760528054520909",
        "TagIdentity": "custom.meimei",
        "TagName": "meimei",
        "TagLevel": 1
      },
      {
        "TagLevel": 1,
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1760852208628750",
        "TagIdentity": "222",
        "TagName": "222"
      },
      {
        "TagId": "1762120939453448",
        "TagIdentity": "专题屏蔽标签",
        "TagName": "专题屏蔽标签",
        "TagLevel": 1,
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": ""
      },
      {
        "TagIdentity": "文章标签屏蔽",
        "TagName": "文章标签屏蔽",
        "TagLevel": 1,
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1762121143197704"
      }
    ],
    "ChangeTags": [
      {
        "ChangeType": "del",
        "Tags": [
          {
            "ParentTagId": "",
            "ParentTagIdentity": "",
            "TagId": "1758641991276568",
            "TagIdentity": "custom.zidingyi",
            "TagName": "zidingyi",
            "TagLevel": 1,
            "TagType": "custom"
          }
        ]
      }
    ]
  }
}

响应示例

{
    "ret":0,
    "msg":"success"
}

专题关联标签变更

请求示例

POST / HTTP/1.1
Host: xxx.xxx.xxx
X-Cms-Timestamp: 1683171064
X-Cms-Nonce: 6008626
X-Cms-Signature: 7d2681c9fd6b800770b688c708c5a5702f94ecbf818b18bf910de4e8cb69c260
Content-Type: application/json

{
  "EventType": "topic_tag_change",
  "EventTime": "2023-05-04T11:31:04+08:00",
  "Version": "1.0",
  "BizPrimaryKey": "1764389673043112_1683171063901",
  "Data": {
    "ChangeTags": [
      {
        "ChangeType": "add",
        "Tags": [
          {
            "TagIdentity": "高级",
            "TagName": "高级-修改",
            "TagLevel": 1,
            "TagType": "custom",
            "ParentTagId": "",
            "ParentTagIdentity": "",
            "TagId": "1756254139754510"
          },
          {
            "TagLevel": 1,
            "TagType": "custom",
            "ParentTagId": "",
            "ParentTagIdentity": "",
            "TagId": "1756254146364430",
            "TagIdentity": "中级",
            "TagName": "中级-修改"
          },
          {
            "TagIdentity": "低级",
            "TagName": "低级",
            "TagLevel": 1,
            "TagType": "custom",
            "ParentTagId": "",
            "ParentTagIdentity": "",
            "TagId": "1756254154142733"
          }
        ]
      }
    ],
    "ObjectId": "1764389673043112",
    "ObjectOpenId": "5164389673019429",
    "TagList": [
      {
        "TagLevel": 1,
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1756254139754510",
        "TagIdentity": "高级",
        "TagName": "高级-修改"
      },
      {
        "TagIdentity": "中级",
        "TagName": "中级-修改",
        "TagLevel": 1,
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1756254146364430"
      },
      {
        "TagLevel": 1,
        "TagType": "custom",
        "ParentTagId": "",
        "ParentTagIdentity": "",
        "TagId": "1756254154142733",
        "TagIdentity": "低级",
        "TagName": "低级"
      }
    ]
  }
}

响应示例

{
    "ret":0,
    "msg":"success"
}

标签树元数据变更

请求示例

POST / HTTP/1.1
Host: xxx.xxx.xxx
X-Cms-Timestamp: 1683188922
X-Cms-Nonce: 6009826
X-Cms-Signature: 922681c9fd6b800770b688c708c5a5702f94ecbf818b18bf910de4e8cb69c260
Content-Type: application/json

{
  "EventType": "tag_tree_change",
  "EventTime": "2023-05-04T16:28:42+08:00",
  "Version": "1.0",
  "BizPrimaryKey": "1764951430147086_1683188921707",
  "Data": {
    "ChangeTags": [
      {
        "ChangeType": "del",
        "Tags": [
          {
            "TagName": "子用户1-改",
            "TagLevel": 1,
            "TagType": "custom",
            "ParentTagId": "",
            "ParentTagIdentity": "",
            "TagId": "1764951430147086",
            "TagIdentity": "子用户1"
          }
        ]
      }
    ]
  }
}

响应示例

{
    "ret":0,
    "msg":"success"
}

分发任务运营规则变更

请求示例

POST / HTTP/1.1
Host: xxx.xxx.xxx
X-Cms-Timestamp: 1686558522
X-Cms-Nonce: 6109826
X-Cms-Signature: 922681c9fd6b800770b688c708c5a5702f94ecbf818b18bf910de4e8cb69c260
Content-Type: application/json


{
    "EventType": "distribute_task_rule_change",
    "EventTime": "2023-06-12T16:28:42+08:00",
    "Version": "1.0",
    "BizPrimaryKey": "1766124001710135_1686558522101",
    "Data": {
        "DistributeTaskId": "1766124001710135",
        "DistributeTaskName": "个性化切换成高时效关闭去重",
        "DistributeRule": {
            "TopRules": [
                {
                    "ObjectType": "article",
                    "ObjectId": "1764062806976542",
                    "ObjectName": "test7",
                    "ExpireTime": "2023-06-14 10:34:16",
                    "NeedImpression": true
                },
                {
                    "ObjectType": "article",
                    "ObjectId": "1766954816806951",
                    "ObjectName": "测试文章",
                    "ExpireTime": "2023-06-15 10:34:30",
                    "NeedImpression": false
                }
            ],
            "ReplaceRules": [
                {
                    "ObjectType": "article",
                    "ObjectName": "兜底测试",
                    "ObjectId": "1714042758674462",
                    "OrderNum": 0
                },
                {
                    "ObjectType": "article",
                    "ObjectName": "发文时间",
                    "ObjectId": "1767945685849112",
                    "OrderNum": 1
                }
            ]
        }
    }
}

响应示例

{
    "ret":0,
    "msg":"success"
}

质检任务数据变更

请求示例

POST / HTTP/1.1
Host: xxx.xxx.xxx
X-Cms-Timestamp: 1686558522
X-Cms-Nonce: 6109826
X-Cms-Signature: 922681c9fd6b800770b688c708c5a5702f94ecbf818b18bf910de4e8cb69c260
Content-Type: application/json

{
    "HttpHeader":{
        "X-Cms-Requestid":"02169225902777300000000000000000000ffff0a2a00a26f70fc",
        "Content-Type":"application/json",
        "X-Cms-Timestamp":"1692259027",
        "X-Cms-Nonce":"1612245",
        "X-Cms-Signature":"d6667d616674f000efb1210327e920be8cbb8656465d707f101efa79bf7d00fc"
    },
    "HttpPayload":{
        "EventType":"audit_task_change",
        "EventTime":"2023-08-17T15:57:07+08:00",
        "Version":"1.0",
        "BizPrimaryKey":"7268193281803157794_1692259027000",
        "Data":{
            "GroupOpenId":"",
            "TaskInfo":{
                "MachineAuditResult":"None",
                "ModelInfoList":[

                ],
                "ProcessType":"OnlyManual",
                "ProjectTitle":"test_dong-图文",
                "HitInfo":null,
                "TaskRound":"ManualRound",
                "TaskResult":"Reject",
                "ProjectStrategyType":"Source",
                "ProjectId":"1687076699474067456",
                "TaskStatus":"Completed",
                "TaskId":"1692080666563522560"
            },
            "AuthorStrategyHit":null,
            "GenerateType":"test_dong",
            "GroupId":"7268193281803157794"
        }
    }
}

响应示例

{
    "ret":0,
    "msg":"success"
}

质检回查数据变更

请求示例

POST / HTTP/1.1
Host: xxx.xxx.xxx
X-Cms-Timestamp: 1686558522
X-Cms-Nonce: 6109826
X-Cms-Signature: 922681c9fd6b800770b688c708c5a5702f94ecbf818b18bf910de4e8cb69c260
Content-Type: application/json

{
    "HttpHeader":{
        "X-Cms-Requestid":"20230818111620C8908AC97C64C8B8D258",
        "Content-Type":"application/json",
        "X-Cms-Timestamp":"1692328581",
        "X-Cms-Nonce":"1191693",
        "X-Cms-Signature":"671a8d813d46c45d72fea0c3f9aa1c726aecfe8f4233a121d41f97aebe5116cc"
    },
    "HttpPayload":{
        "EventType":"audit_retrace_change",
        "EventTime":"2023-08-18T11:16:21+08:00",
        "Version":"1.0",
        "BizPrimaryKey":"1234551233_1692328581012",
        "Data":{
            "GroupId":"1234551233",
            "GroupOpenId":"12988888",
            "GenerateType":"test_dong",
            "TaskInfo":{
                "TaskId":"123456",
                "TaskName":"xxx指定内容回查"
            },
            "TaskResult":"Reject"
        }
    }
}

响应示例

{
    "ret":0,
    "msg":"success"
}

内容状态变更

请求示例

POST / HTTP/1.1
Host: xxx.xxx.xxx
X-Cms-Timestamp: 1686558522
X-Cms-Nonce: 6109826
X-Cms-Signature: 922681c9fd6b800770b688c708c5a5702f94ecbf818b18bf910de4e8cb69c260
Content-Type: application/json

{
    "HttpHeader":{
        "X-Cms-Requestid":"20230818111620C8908AC97C64C8B8D258",
        "Content-Type":"application/json",
        "X-Cms-Timestamp":"1692328581",
        "X-Cms-Nonce":"1191693",
        "X-Cms-Signature":"671a8d813d46c45d72fea0c3f9aa1c726aecfe8f4233a121d41f97aebe5116cc"
    },
    "HttpPayload":{
        "EventType":"group_status_change",
        "EventTime":"2023-08-18T11:16:21+08:00",
        "Version":"1.0",
        "BizPrimaryKey":"1234551233_1692328581012",
        "Data":{
            "GroupId":"1234551233",
            "GroupOpenId":"12988888",
            "GenerateType":"test_dong",
            "FromStatus":"init",
            "ToStatus":"online",
            "ChangeTime":"2023-01-01 10:10:00"
        }
    }
}

响应示例

{
    "ret":0,
    "msg":"success"
}

专题状态变更

请求示例

POST / HTTP/1.1
Host: xxx.xxx.xxx
X-Cms-Timestamp: 1686558522
X-Cms-Nonce: 6109826
X-Cms-Signature: 922681c9fd6b800770b688c708c5a5702f94ecbf818b18bf910de4e8cb69c260
Content-Type: application/json

{
    "HttpHeader":{
        "X-Cms-Requestid":"20230818111620C8908AC97C64C8B8D258",
        "Content-Type":"application/json",
        "X-Cms-Timestamp":"1692328581",
        "X-Cms-Nonce":"1191693",
        "X-Cms-Signature":"671a8d813d46c45d72fea0c3f9aa1c726aecfe8f4233a121d41f97aebe5116cc"
    },
    "HttpPayload":{
        "EventType":"topic_status_change",
        "EventTime":"2023-08-18T11:16:21+08:00",
        "Version":"1.0",
        "BizPrimaryKey":"1234551233_1692328581012",
        "Data":{
            "TopicId":"1234551233",
            "TopicOpenId":"12988888",
            "FromStatus":"online",
            "ToStatus":"offline",
            "TopicSource":"api",
            "ChangeTime":"2023-01-01 10:10:00"
        }
    }
}

响应示例

{
    "ret":0,
    "msg":"success"
}

专题内容变更

请求示例

POST / HTTP/1.1
Host: xxx.xxx.xxx
X-Cms-Timestamp: 1686558522
X-Cms-Nonce: 6109826
X-Cms-Signature: 922681c9fd6b800770b688c708c5a5702f94ecbf818b18bf910de4e8cb69c260
Content-Type: application/json

{
    "HttpHeader":{
        "X-Cms-Requestid":"20230818111620C8908AC97C64C8B8D258",
        "Content-Type":"application/json",
        "X-Cms-Timestamp":"1692328581",
        "X-Cms-Nonce":"1191693",
        "X-Cms-Signature":"671a8d813d46c45d72fea0c3f9aa1c726aecfe8f4233a121d41f97aebe5116cc"
    },
    "HttpPayload":{
        "EventType":"topic_info_change",
        "EventTime":"2023-08-18T11:16:21+08:00",
        "Version":"1.0",
        "BizPrimaryKey":"1234551233_1692328581012",
        "Data":{
            "TopicId":"1234551233",
            "TopicOpenId":"12988888",
            "TopicStatus":"online",
            "TopicSource":"api",
            "BasicInfoChange":{
                 "From":{
                     "TopicName":"专题名1",
                     "CoverImgUrl":"https://pic2.zhimg.com/v2-998d6350e0310199125669a438c574b6_",
                     "ShareImgUrl":"https://pic2.zhimg.com/v2-998d6350e0310199125669a438c574b6_",
                     "TopicDesc":"xxxx",
                     "ExtInfo":"abc"
                 },
                 "To":{
                     "TopicName":"专题名2",
                     "CoverImgUrl":"https://pic2.zhimg.com/v2-998d6350e0310199125669a438c574b6_",
                     "ShareImgUrl":"https://pic2.zhimg.com/v2-998d6350e0310199125669a438c574b6_",
                     "TopicDesc":"xxxx",
                     "ExtInfo":"abc"
                 }
            },
            "LandingPageUrlChange":{
                "From":"https://pic2.zhimg.com/v2-998d6350e0310199125669a438c574b6_",
                "To":"https://pic1.zhimg.com/v2-998d6350e0310199125669a438c574b6_"
            }
            "ChangeTime":"2023-01-01 10:10:00"
        }
    }
}

响应示例

{
    "ret":0,
    "msg":"success"
}
注意事项

注意

  • 防重复推送说明:建议客户侧服务端根据请求参数中的业务主键做防重复
  • 请求超时说明:默认10s超时。建议服务端收到回调请求后,先确认回调结果,再异步进行业务逻辑处理,避免回调超时。
推送埋点事件

适用于推送类型为push_task(通用推送)或push_indi_task(个性化推送)。

事件名称事件上报时机核心参数字段类型字段描述说明
PUSH消息接收【服务端埋点】cms_push_receive客户侧服务端接收到push消息(成功时上报)enter_fromstring入口固定值,上报click_category
group_idbigint内容 id对应内容推荐接口返回的GroupId
push_idstringpush任务id对应的push任务id
push_version_idstringpush任务轮次id对应的push任务的轮次id
__itemsstring用于内容特征分析[{\"group_item\":[{\"id\":\"xx\"}]}], id为GroupId
params_for_specialstring用于标识内容管理平台固定值,上报content_manager_system
PUSH消息下发cms_push_send下发push内容category_namestring场景id管理平台场景id,需创建PUSH场景
enter_fromstring入口固定值,上报click_category
group_idbigint内容 id对应内容推荐接口返回的GroupId
push_idstringpush任务id对应的push任务id
push_version_idstringpush任务轮次id对应的push任务的轮次id
__itemsstring用于内容特征分析[{\"group_item\":[{\"id\":\"xx\"}]}], id为GroupId
params_for_specialstring用于标识内容管理平台固定值,上报content_manager_system
PUSH消息展现cms_push_showpush内容在通知栏展示category_namestring场景id管理平台场景id,需创建PUSH场景
enter_fromstring入口固定值,上报click_category
group_idbigint内容 id对应内容推荐接口返回的GroupId
push_idstringpush任务id对应的push任务id
push_version_idstringpush任务轮次id对应的push任务的轮次id
__itemsstring用于内容特征分析[{\"group_item\":[{\"id\":\"xx\"}]}], id为GroupId
params_for_specialstring用于标识内容管理平台固定值,上报content_manager_system
req_idstring请求id请求内容推荐接口返回的RequestId
PUSH消息点击cms_push_click从通知栏点击push内容category_namestring场景id管理平台场景id,需创建PUSH场景
enter_fromstring入口分享回流,上报click_category
group_idbigint内容id对应内容推荐接口返回的GroupId
push_idstringpush任务id对应的push任务id
push_version_idstringpush任务轮次id对应的push任务的轮次id
__itemsstring用于内容特征分析[{\"group_item\":[{\"id\":\"xx\"}]}], id为GroupId
params_for_specialstring用于标识内容管理平台固定值,上报content_manager_system
req_idstring请求id请求内容推荐接口返回的RequestId