描述:
输入参数:
accKey |
token |
dataList |
devIds |
isGetDevData |
name |
taskTime |
taskType |
密钥 |
token认证 |
数据列表JSON |
设备Id数组 |
是否使用数据 |
任务名称 |
定时任务的时间 |
执行方式 |
accKey 密钥
token token认证
dataList 数据列表JSON
具体参数如下:
scheduleTime 定时时间
pluginId 插件Id
pluginUid 插件标识
version 插件版本
subTaskName 子任务名称
resId 素材Id
resType 素材类型
resVoV3 素材JSON
具体参数如下:
{
resPic 图片地址列表
resText 文本
resVideo 视频地址列表
size 文件大小
type 素材类型(1:文本 2:图片 3:视频 5:图片+文字 6:视频+文字)
}
useResType 使用素材类型
0 :使用素材中心的数据(resId , resType必填)
4 :使用resVoV3的数据(resVoV3数据必填)
dataTagList 数据标签列表
dataNum 每个设备取数据的个数
customerIdList 上传数据返回的Id列表
dataFilter 数据筛选条件(默认:and flag=0)
isContinue 是否继续执行 1 是 0 否
view 视图(脚本使用)
devIds 设备Id数组
1.设备Id列表中只有一个设备Id,此设备将会使用所有数据
2.设备Id列表中有多个设备Id,将会平均分配数据
isGetDevData 是否使用数据(-1:不使用 0:使用)
name 任务名称
taskTime 定时任务的时间(使用定时执行,必填)
taskType 执行方式 0 立即执行 1 定时执行
返回参数:
Code 状态码
Reason 原因
详情:
code=0,reason=操作成功
code=100,reason=操作失败,无效的accessKey信息
code=102,reason=操作失败,无效的token信息
code=104,reason=操作失败,未授权的accessKey
code=105,reason=操作失败,token与accessKey不匹配
code=106,reason=操作失败,token已经过期
code=5506,reason=操作失败, 所选设备都是离线
返回格式例子:
{
"code": 0,
"reason": "操作成功",
}
{
"code": 5506,
"reason": "操作失败, 所选设备都是离线"
}
例子:
使用素材例子:
1使用素材中心发朋友圈立即执行例子:
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"isGetDevData": -1,
"dataList": [
{
"subTaskName":"发朋友圈",
"pluginId": 1,
"pluginUid": "OS_XXXX",
"resId": 1,
"useResType": 0,
"version": 1
}
],
"devIds": [
1,2,3
],
"name": "发朋友圈",
"taskType": 0
}
2使用素材中心发朋友圈定时执行例子:
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"isGetDevData": -1,
"dataList": [
{
"subTaskName":"发朋友圈",
"pluginId": 1,
"pluginUid": "OS_XXXX",
"resId": 1,
"useResType": 0,
"version": 1
}
],
"devIds": [
1,2,3
],
"name": "发朋友圈",
"taskTime": "2018-01-05 11:00:13",
"taskType": 1
}
3使用网络素材立即执行发送图片例子:
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"isGetDevData": -1,
"dataList": [
{
"subTaskName":"发朋友圈",
"pluginId": 1,
"pluginUid": "OS_XXXX",
"resVoV3": {
"resText": "[\"你好\"]",
"size": 0,
"type": 1
},
"useResType": 4,
"version": 1,
}
],
"devIds": [
1,2,3
],
"name": "发朋友圈",
"taskType": 0
}
4使用网络素材发送图片:
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"isGetDevData": -1,
"dataList": [
{
"subTaskName": "发朋友圈",
"pluginId": 612,
"pluginUid": "OS_XXXX",
"resVoV3": {
"resPic": "[\"http://ocpep7bl9.bkt.clouddn.com/a9859dca.png\",\"http://ocpep7bl9.bkt.clouddn.com/occultation.gif\"]",
"size": 0,
"type": 2
},
"useResType": 4,
"version": 3
}
],
"devIds": [
130
],
"name": "发朋友圈",
"taskType": 0
}
5使用网络素材发送视频:
{
"accKey": "X+D125XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"isGetDevData": -1,
"dataList": [
{
"subTaskName": "发朋友圈",
"pluginId": 612,
"pluginUid": "OS_XXXX",
"resVoV3": {
"resVideo": "[\"http://ocpep7bl9.bkt.clouddn.com/002b4a49-3ec1-441b-9ec2-fa2df6fc5ba9_49.mp4\"]",
"size": 0,
"type": 3
},
"useResType": 4,
"version": 3
}
],
"devIds": [
130
],
"name": "发朋友圈",
"taskType": 0
}
6使用网络素材发送图片+文字:
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"isGetDevData": -1,
"dataList": [
{
"subTaskName": "发朋友圈",
"pluginId": 612,
"pluginUid": "OS_XXXX",
"resText":"[\"你好\"]",
"resVoV3": {
"resPic": "[\"http://ocpep7bl9.bkt.clouddn.com/a9859dca.png\",\"http://ocpep7bl9.bkt.clouddn.com/occultation.gif\"]",
"size": 0,
"type": 5
},
"useResType": 4,
"version": 3
}
],
"devIds": [
130
],
"name": "发朋友圈",
"taskType": 0
}
7使用网络素材发送视频+文字:
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"isGetDevData": -1,
"dataList": [
{
"subTaskName": "发朋友圈",
"pluginId": 612,
"pluginUid": "OS_XXXX",
"resVoV3": {
"resText": "[\"你好\"]",
"resVideo": "[\"http://ocpep7bl9.bkt.clouddn.com/002b4a49-3ec1-441b-9ec2-fa2df6fc5ba9_49.mp4\"]",
"size": 0,
"type": 3
},
"useResType": 4,
"version": 6
}
],
"devIds": [
130
],
"name": "发朋友圈",
"taskType": 0
}
使用数据例子:
1好友检测立即执行例子(使用上传数据接口返回的Id):
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"dataList": [
{
"subTaskName":"检测微信号",
"customerIdList": [
1,2,3
],
"pluginId": 1,
"pluginUid": "OS_XXXX",
"version": 1,
}
],
"devIds": [
1,2
],
"isGetDevData": 0,
"name": "检测微信号",
"taskType": 0
}
2好友检测定时执行例子(使用上传数据接口返回的Id):
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"dataList": [
{
"subTaskName":"检测微信号",
"customerIdList": [
1,2,3
],
"pluginId": 1,
"pluginUid": "OS_XXXX",
"version": 1,
}
],
"devIds": [
1,2
],
"isGetDevData": 0,
"name": "检测微信号",
"taskTime": "2018-01-05 11:00:13",
"taskType": 1
}
3好友检测使用数据标签:
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"dataList": [
{
"subTaskName":"检测微信号",
"dataTagList": [
1,2,3
],
"dataNum":1,
"dataFilter":"and flag=0",
"pluginId": 1,
"pluginUid": "OS_XXXX",
"version": 1,
}
],
"devIds": [
1,2
],
"isGetDevData": 0,
"name": "检测微信号",
"taskType": 0
}
使用视图例子:
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"dataList": [
{
"subTaskName":"快速加人",
"pluginId": 1,
"pluginUid": "OS_XXXX",
"version": 1,
"view": "{\"view_hs\":\"111111\",\"view_num\":\"18698724253\"}"
}
],
"devIds": [
1,2
],
"isGetDevData": 0,
"name": "快速加人",
"taskType": 0
}
------------------------------------------2018-1-23新增------------------------------------------
描述:
查询指定标签总条数例子:
输入参数例子:
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"name": "今日头条",
}
返回格式例子:
{
"code": 0,
"payload": 1
}
描述:
获取标签(分页)例子:
输入参数例子:
{
"accKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"token" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"name": "今日头条",
"page": 1, //第几页
"pageSize": 5, //每页显示多少条
}
返回格式例子:
{
"code": 0,
"payload": [
{
"id": 7,
"name": "今日头条",
"cnt": 2 //当前标签下有多少条数据
}
]
}
返回参数(查询指定标签总条数,获取标签(分页)):
Code 状态码
详情:
code=0,操作成功
code=100,无效的accessKey信息
code=102,无效的token信息
code=104,未授权的accessKey
code=105,token与accessKey不匹配
code=106,token已经过期