内容管理
针对客户下有开启tag开关的域名内的有标识的tag的文件进行推送。
单用户调用频率:30/5min
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
tag | String | 是 | tag的值: 1.多个tag值有,隔开,最大允许30个值 2.每个tag值最大长度为128字符 3.不允许特殊字符,特殊字符是指:中文,空格符及*''(),:;<=>?@[]{}<> |
action | String | 否 | 刷新动作 1、不填的话默认是删除 2、0代表删除;1代表过期 |
参数名称 | 类型 | 描述 |
---|---|---|
Code | String | 表示任务创建结果的状态码 |
Message | String | 表示任务提交后,系统的响应消息 |
itemId | String | 调用一次接口并提交任务成功后,将返回一个iteamId,是当次提交任务的唯一标识,通过itemId可批量查询任务的状态(成功/失败)。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
Success | handle success | 200 | 任务提交成功 |
ParseParameterError | parse parameter json error | 400 | json解析出错 |
UserNameInvalid | The userName is empty or not enabled or non-primary | 400 | 用户名为空或用户未启用或者非主账号 |
ActionInvalid | action must be 0 or 1 | 400 | 操作类型必须0或者1 |
TagIsEmpty | tag is not empty | 400 | tag不能为空 |
SingleTagLengthLessThan128 | a single tag cannot exceed 128 characters | 400 | 单个tag长度不能超过128字符 |
TagCountLessThan30 | the number of tags cannot exceed 30 | 400 | tag的数量不能超过30个 |
TagValueIsIllegal | the tag value cannot contain special characters or Chinese | 400 | tag值不能包含特殊字符或者中文 |
ExceedDailyLimit | the user[userName] daily purge tags exceeds the limit[count] | 400 | 用户[用户名]每日推送tag数超过上限[2000] |
ExceedDailyLimit | the user[userName] daily purge tags exceeds the limit[count] | 400 | 若传入的头部带时区,那么提示包含对应时区的时间区间,例如 the number of url regular out of 2018-10-17 01:00:00GMT+09:00~2018-10-18 00:59:59GMT+09:00 limit(500) |
ExceedDailyLimit | the user[userName] daily purge tags exceeds the limit[count] | 400 | the user[userName] 2018-10-17 01:00:00GMT+09:00~2018-10-18 00:59:59GMT+09:00 purge tags exceeds the limit[count] |
NotEnableTagPurge | the user[userName] does not enable any channel tag purge | 400 | 用户[用户名]没有开启任何频道tag推送 |
NotFindAppgGroup | the user[userName] does not find any application group | 400 | 用户[用户名]未找到tag推送对应的应用服务组 |
SystemException | system exception | 500 | 系统内部异常 |
NotImplemented | system error | 501 | 系统dna接口未激活 |
#!/bin/bash username="username_exmaple" apiKey="apiKey_exmaple" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/api/content/tag/purge" \ -X "POST" \ -u "$username:$password" \ -H "Date:$date" \ -H "Content-Type: application/json" \ -d'{ "tag": "abc,edf,wcs", "action": "0" }'
{ "Code":Success, "Message":"handle success", "itemId":"64ec364dd81d4052a3534c1e86167950" }