IP binding
The workbench can be bound to the server IP address. Before binding, all IPs can call the REST API. After binding, only the bound IP has the calling authority.
Device information query interface
Query device information based on RegistrationId
interface address
http://api.push.mob.com/device-v3/getById/{registrationId}
request method
GET
request header
parameter name |
Parameter Type |
Parameter Description |
Content-Type |
application/json |
required parameters |
key |
String |
MobAppKey in Mob background |
sign |
String |
Encryption parameters, the encryption rule is: md5(MobAppSecret) |
Request parameters:
parameter name |
Parameter Type |
Is the parameter required |
Parameter Description |
registrationId |
String |
yes |
device registrationId |
request example
curl --location --request GET 'http://api.push.mob.com/device-v3/getById/65l0soev0d0b4lc' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'key: 2e08782eb311b' \
--header 'sign: 9f1bb16df0167c733eb83875dfe445db'
Return parameter description
parameter name |
Parameter Type |
Parameter Description |
registrationId |
String |
The registrationId obtained by the rid user client |
tags |
String[] |
array of device tags |
alias |
String |
device alias |
mobile |
String |
Mobile phone number (used for functions such as SMS replenishment) |
openPush |
number |
Whether to enable push 1: enable, 0: disable |
status |
number |
Device status 1: normal, 3: uninstalled, 0: deleted (uninstall statistics are not enabled) |
return example
{
"status": 200,
"res": {
"registrationId": "65l0soev0d0b4lc",
"tags": [
"TestTag2",
"TestTag1"
],
"alias": "TestAlias",
"mobile": null,
"openPush": 1,
"status": 1
},
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
Query device information by alias
interface address
http://api.push.mob.com/device-v3/getByAlias/{alias}
request method
GET
request header
parameter name |
Parameter Type |
Parameter Description |
Content-Type |
application/json |
required parameters |
key |
String |
MobAppKey in Mob background |
sign |
String |
Encryption parameters, the encryption rule is: md5(MobAppSecret) |
Request parameters:
parameter name |
Parameter Type |
Is the parameter required |
Parameter Description |
alias |
String |
yes |
Aliases for device settings |
request example
curl --location --request GET 'http://api.push.mob.com/device-v3/getByAlias/TestAlias' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'key: 2e08782eb311b' \
--header 'sign: 9f1bb16df0167c733eb83875dfe445db'
Return parameter description
parameter name |
Parameter Type |
Parameter Description |
registrationId |
String |
The registrationId obtained by the rid user client |
tags |
String[] |
array of device tags |
alias |
String |
device alias |
mobile |
String |
Mobile phone number (used for functions such as SMS replenishment) |
openPush |
number |
Whether to enable push 1: enable, 0: disable |
status |
number |
Device status 1: normal, 3: uninstalled, 0: deleted (uninstall statistics are not enabled) |
return example
{
"status": 200,
"res": {
"registrationId": "65l0soev0d0b4lc",
"tags": [
"TestTag2",
"TestTag1"
],
"alias": "TestAlias",
"mobile": null,
"openPush": 1,
"status": 1
},
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
View and query device information according to tags
interface address
http://api.push.mob.com/device-v3/queryByTags
request method
POST
request header
parameter name |
Parameter Type |
Parameter Description |
Content-Type |
application/json |
required parameters |
key |
String |
MobAppKey in Mob background |
sign |
String |
Encryption parameter, the encryption rule is: md5(request parameter+MobAppSecret) |
Request parameters:
parameter name |
Parameter Type |
Is the parameter required |
Parameter Description |
appkey |
String |
yes |
MobAppKey in Mob background |
tags |
String[] |
yes |
Tag array, intersection query, need to match all the tags under the rid |
request example
curl --location --request POST 'http://api.push.mob.com/device-v3/queryByTags' \
--header 'key: 2e08782eb311b' \
--header 'sign: adf46949ac9ba0732e966d2fb43eebf3' \
--header 'Content-Type: application/json' \
--data-raw '{"appkey":"2e08782eb311b","tags":["TestTag2"]}'
Return parameter description
Return description: Currently only 1000 pieces of equipment related information are returned
parameter name |
Parameter Type |
Parameter Description |
registrationId |
String |
The registrationId obtained by the rid user client |
tags |
String[] |
array of device tags |
alias |
String |
device alias |
mobile |
String |
Mobile phone number (used for functions such as SMS replenishment) |
openPush |
number |
Whether to enable push 1: enable, 0: disable |
status |
number |
Device status 1: normal, 3: uninstalled, 0: deleted (uninstall statistics are not enabled) |
return example
{
"status": 200,
"res": [
{
"registrationId": "65l0soev0d0b4lc",
"tags": [
"TestTag2",
"TestTag1"
],
"alias": "TestAlias",
"mobile": null,
"openPush": 1,
"status": 1
}
],
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
functional interface
label settings
interface address
http://api.push.mob.com/device-v3/updateTags
request method
POST
request header
parameter name |
Parameter Type |
Parameter Description |
Content-Type |
application/json |
required parameters |
key |
String |
MobAppKey in Mob background |
sign |
String |
Encryption parameter, the encryption rule is: md5(request parameter+MobAppSecret) |
request parameters
parameter name |
Parameter Type |
Is the parameter required |
Parameter Description |
appkey |
String |
yes |
MobAppKey in Mob background |
registrationId |
String |
yes |
The registrationId obtained by the user client port |
opType |
number |
no |
Operation type: 1 Add a label; 2 Delete a label; 3 Clear a label |
tags |
String[] |
no |
Tag array (do not pass in when opType is 3) |
request example
curl --location --request POST 'http://api.push.mob.com/device-v3/updateTags' \
--header 'key: 2e08782eb311b' \
--header 'sign: 5abb496fcc0da0de1df3c377791fb1f1' \
--header 'Content-Type: application/json' \
--data-raw '{
"appkey":"2e08782eb311b",
"registrationId":"65l0soev0d0b4lc",
"opType":"1",
"tags":["TestTag3","TestTag4"]
}'
Return parameter description
parameter name |
Parameter Type |
Parameter Description |
status |
number |
satus=200 success |
res |
object |
temporarily returns null |
error |
String |
返回error |
返回示例
{
"status": 200,
"res": null,
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
别名设置
接口地址
http://api.push.mob.com/device-v3/updateAlias
请求方式
POST
请求头部
参数名 |
参数类型 |
参数说明 |
Content-Type |
application/json |
必要参数 |
key |
String |
Mob后台的MobAppKey |
sign |
String |
加密参数,加密规则为: md5(请求参数+MobAppSecret) |
请求参数
参数名 |
参数类型 |
是否必要参数 |
参数说明 |
appkey |
String |
否 |
Mob后台的MobAppKey |
registrationId |
String |
是 |
用户客户端口获取的registrationId |
alias |
String |
否 |
需要设置的别名 |
请求示例
curl --location --request POST 'http://api.push.mob.com/device-v3/updateAlias' \
--header 'key: 2e08782eb311b' \
--header 'sign: 5' \
--header 'Content-Type: application/json' \
--data-raw '{
"appkey":"2e08782eb311b",
"registrationId":"65l0soev0d0b4lc",
"alias":"gxdaoxinsj"
}'
返回参数说明
参数名 |
参数类型 |
参数说明 |
status |
number |
satus=200 成功 |
res |
object |
暂时返回null |
error |
String |
返回error |
返回示例
{
"status": 200,
"res": null,
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
推送任务查询接口
查询推送任务状态
接口地址
http://api.push.mob.com/v3/push/getWorkStatus
请求方式
POST
请求头部
参数名 |
参数类型 |
参数说明 |
Content-Type |
application/json |
必要参数 |
key |
String |
Mob后台的MobAppKey |
sign |
String |
加密参数,加密规则为: md5(请求参数+MobAppSecret) |
请求参数
参数名 |
参数类型 |
参数说明 |
appkey |
String |
Mob后台的MobAppKey |
workId |
String |
推送任务的唯一任务id |
请求示例
curl --location --request POST 'http://api.push.mob.com/v3/push/getWorkStatus' \
--header 'key: 2e08782eb311b' \
--header 'sign: 15863cb512d9bac150cfc089cfac0b74' \
--header 'Content-Type: application/json' \
--data-raw '{"appkey":"2e08782eb311b","workId":"1609fr73wopsdgcqli4g"}'
返回参数说明
参数名 |
参数类型 |
说明 |
status |
number |
状态码 |
res |
string |
任务状态:”发送完成“、“取消成功”、“创建中”、“等待发送”、“发送中”、“发送完成”、“发送失败”、“停止发送”、“已取消”、 “取消成功”、“已撤回”、“下发失败” |
error |
string |
报错信息(正常情况值为null) |
返回示例
{
"status": 200,
"res": "发送完成",
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
查询推送详情(根据workId查询)
接口地址
http://api.push.mob.com/v3/stats/getByWorkId
请求方式
POST
请求头部
参数名 |
参数类型 |
参数说明 |
Content-Type |
application/json |
必要参数 |
key |
String |
Mob后台的MobAppKey |
sign |
String |
加密参数,加密规则为: md5(请求参数+MobAppSecret) |
请求参数
参数名 |
参数类型 |
参数说明 |
appkey |
String |
Mob后台的MobAppKey |
workId |
String |
推送任务的唯一任务id |
请求示例
curl --location --request POST 'http://api.push.mob.com/v3/stats/getByWorkId' \
--header 'key: 2e08782eb311b' \
--header 'sign: 15863cb512d9bac150cfc089cfac0b74' \
--header 'Content-Type: application/json' \
--data-raw '{"appkey":"2e08782eb311b","workId":"1609fr73wopsdgcqli4g"}'
返回参数说明
参数名 |
|
|
参数类型 |
说明 |
status |
|
|
Int |
状态码 |
res |
|
|
object |
返回结果 |
|
ios |
|
object |
iOS的统计可以参考下面展开参数 |
|
|
fetchNum |
int |
返回的设备数量 |
|
|
deliverNum |
int |
实际下发的设备数量 |
|
|
deliverFailNum |
int |
下发失败的数量 |
|
|
reportNum |
int |
下发后回执的数量 (iOS回执不准确或者为0仅供参考) |
|
|
reportFailNum |
int |
下发后回执失败的数量 |
|
|
clickNum |
int |
点击通知的数量 |
|
android |
|
object |
安卓的统计可以参考上面iOS展开参数 |
|
factory |
|
object |
通过厂商和APNS下发的统计 参考同上 |
|
mobpush |
|
object |
通过MobPush通道下发的统计 参考同上 |
|
iostcp |
|
object |
通过MobPush通道下发iOS的统计 参考同上 |
|
androidtcp |
|
object |
通过MobPush通道下发Android的统计 参考同上 |
|
apns |
|
object |
通过APNS下发的统计 参考同上 |
|
huawei |
|
object |
通过华为厂商下发的统计 参考同上 |
|
xiaomi |
|
object |
通过小米厂商下发的统计 参考同上 |
|
flyme |
|
object |
通过魅族厂商下发的统计 参考同上 |
|
fcm |
|
object |
通过谷歌厂商下发的统计 参考同上 |
|
oppo |
|
object |
通过oppo厂商下发的统计 参考同上 |
|
vivo |
|
object |
通过vivo厂商下发的统计 参考同上 |
|
sms |
|
object |
短信补量下发统计 |
|
offlineIos |
|
object |
iOS离线统计 |
|
offlineAndroid |
|
object |
安卓离线统计 |
error |
|
|
String |
错误信息 |
返回示例
{
"status": 200,
"res": {
"workno": null,
"id": "1609fr73wopsdgcqli4g",
"android": {
"fetchNum": 1,
"deliverNum": 1,
"deliverFailNum": 0,
"reportNum": 1,
"reportFailNum": 0,
"clickNum": 0
},
"ios": null,
"factory": null,
"mobpush": {
"fetchNum": 1,
"deliverNum": 1,
"deliverFailNum": 0,
"reportNum": 1,
"reportFailNum": 0,
"clickNum": 0
},
"iostcp": null,
"androidtcp": {
"fetchNum": 1,
"deliverNum": 1,
"deliverFailNum": 0,
"reportNum": 1,
"reportFailNum": 0,
"clickNum": 0
},
"apns": null,
"huawei": null,
"xiaomi": null,
"flyme": null,
"fcm": null,
"oppo": null,
"vivo": null,
"offlineIos": null,
"offlineAndroid": null,
"sms": null
},
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
查询推送详情(根据workId数组查询)
接口地址
http://api.push.mob.com/v3/stats/getByWorkIds
请求方式
POST
请求头部
参数名 |
参数类型 |
参数说明 |
Content-Type |
application/json |
必要参数 |
key |
String |
Mob后台的MobAppKey |
sign |
String |
加密参数,加密规则为: md5(请求参数+MobAppSecret) |
请求参数
参数名 |
参数类型 |
参数说明 |
appkey |
String |
Mob后台的MobAppKey |
workIds |
String[] |
推送任务id的数组 |
请求示例
curl --location --request POST 'http://api.push.mob.com/v3/stats/getByWorkIds' \
--header 'key: 2e08782eb311b' \
--header 'sign: f5a56c1cd0c1613efe38659548aa930d' \
--header 'Content-Type: application/json' \
--data-raw '{"appkey":"2e08782eb311b","workIds":["1609fr73wopsdgcqli4g","1609hk2tuchfl5i3l1j4"]}'
返回参数说明
参数名 |
|
|
参数类型 |
说明 |
status |
|
|
Int |
状态码 |
res |
|
|
String[] |
返回结果 |
|
ios |
|
object |
iOS的统计可以参考下面展开参数 |
|
|
fetchNum |
int |
返回的设备数量 |
|
|
deliverNum |
int |
实际下发的设备数量 |
|
|
deliverFailNum |
int |
下发失败的数量 |
|
|
reportNum |
int |
下发后回执的数量 (iOS回执不准确或者为0仅供参考) |
|
|
reportFailNum |
int |
下发后回执失败的数量 |
|
|
clickNum |
int |
点击通知的数量 |
|
android |
|
object |
安卓的统计可以参考上面iOS展开参数 |
|
factory |
|
object |
通过厂商和APNS下发的统计 参考同上 |
|
mobpush |
|
object |
通过MobPush通道下发的统计 参考同上 |
|
iostcp |
|
object |
通过MobPush通道下发iOS的统计 参考同上 |
|
androidtcp |
|
object |
通过MobPush通道下发Android的统计 参考同上 |
|
apns |
|
object |
通过APNS下发的统计 参考同上 |
|
huawei |
|
object |
通过华为厂商下发的统计 参考同上 |
|
xiaomi |
|
object |
通过小米厂商下发的统计 参考同上 |
|
flyme |
|
object |
通过魅族厂商下发的统计 参考同上 |
|
fcm |
|
object |
通过谷歌厂商下发的统计 参考同上 |
|
oppo |
|
object |
通过oppo厂商下发的统计 参考同上 |
|
vivo |
|
object |
通过vivo厂商下发的统计 参考同上 |
|
sms |
|
object |
短信补量下发统计 |
|
offlineIos |
|
object |
iOS离线统计 |
|
offlineAndroid |
|
object |
安卓离线统计 |
error |
|
|
String |
错误信息 |
返回示例
{
"status": 200,
"res": [
{
"workno": null,
"id": "1609fr73wopsdgcqli4g",
"android": {
"fetchNum": 1,
"deliverNum": 1,
"deliverFailNum": 0,
"reportNum": 1,
"reportFailNum": 0,
"clickNum": 0
},
"ios": null,
"factory": null,
"mobpush": {
"fetchNum": 1,
"deliverNum": 1,
"deliverFailNum": 0,
"reportNum": 1,
"reportFailNum": 0,
"clickNum": 0
},
"iostcp": null,
"androidtcp": {
"fetchNum": 1,
"deliverNum": 1,
"deliverFailNum": 0,
"reportNum": 1,
"reportFailNum": 0,
"clickNum": 0
},
"apns": null,
"huawei": null,
"xiaomi": null,
"flyme": null,
"fcm": null,
"oppo": null,
"vivo": null,
"offlineIos": null,
"offlineAndroid": null,
"sms": null
},
{
"workno": null,
"id": "1609hk2tuchfl5i3l1j4",
"android": {
"fetchNum": 2,
"deliverNum": 2,
"deliverFailNum": 0,
"reportNum": 1,
"reportFailNum": 0,
"clickNum": 0
},
"ios": null,
"factory": {
"fetchNum": 1,
"deliverNum": 1,
"deliverFailNum": 0,
"reportNum": 0,
"reportFailNum": 0,
"clickNum": 0
},
"mobpush": {
"fetchNum": 1,
"deliverNum": 1,
"deliverFailNum": 0,
"reportNum": 1,
"reportFailNum": 0,
"clickNum": 0
},
"iostcp": null,
"androidtcp": {
"fetchNum": 1,
"deliverNum": 1,
"deliverFailNum": 0,
"reportNum": 1,
"reportFailNum": 0,
"clickNum": 0
},
"apns": null,
"huawei": {
"fetchNum": 1,
"deliverNum": 1,
"deliverFailNum": 0,
"reportNum": 0,
"reportFailNum": 0,
"clickNum": 0
},
"xiaomi": null,
"flyme": null,
"fcm": null,
"oppo": null,
"vivo": null,
"offlineIos": null,
"offlineAndroid": null,
"sms": null
}
],
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
查询推送详情(根据workno查询)
workno为自定义任务ID,只能查询最近3天的数据
接口地址
http://api.push.mob.com/v3/stats/getByWorkno
请求方式
POST
请求头部
参数名 |
参数类型 |
参数说明 |
Content-Type |
application/json |
必要参数 |
key |
String |
Mob后台的MobAppKey |
sign |
String |
加密参数,加密规则为: md5(请求参数+MobAppSecret) |
请求参数
参数名 |
参数类型 |
参数说明 |
appkey |
String |
Mob后台的MobAppKey |
workno |
String |
用户的推送任务id |
请求示例
curl --location --request POST 'http://api.push.mob.com/v3/stats/getByWorkno' \
--header 'key: 2e08782eb311b' \
--header 'sign: 8ecb4cf84760efe64578a83583b324b5' \
--header 'Content-Type: application/json' \
--data-raw '{"appkey":"2e08782eb311b","workno":"gxd123456789"}'
返回参数说明
参数名 |
|
|
参数类型 |
说明 |
status |
|
|
Int |
状态码 |
res |
|
|
object |
返回结果 |
|
ios |
|
object |
iOS的统计可以参考下面展开参数 |
|
|
fetchNum |
int |
返回的设备数量 |
|
|
deliverNum |
int |
实际下发的设备数量 |
|
|
deliverFailNum |
int |
下发失败的数量 |
|
|
reportNum |
int |
下发后回执的数量 (iOS回执不准确或者为0仅供参考) |
|
|
reportFailNum |
int |
下发后回执失败的数量 |
|
|
clickNum |
int |
点击通知的数量 |
|
android |
|
object |
安卓的统计可以参考上面iOS展开参数 |
|
factory |
|
object |
通过厂商和APNS下发的统计 参考同上 |
|
mobpush |
|
object |
通过MobPush通道下发的统计 参考同上 |
|
iostcp |
|
object |
通过MobPush通道下发iOS的统计 参考同上 |
|
androidtcp |
|
object |
通过MobPush通道下发Android的统计 参考同上 |
|
apns |
|
object |
通过APNS下发的统计 参考同上 |
|
huawei |
|
object |
通过华为厂商下发的统计 参考同上 |
|
xiaomi |
|
object |
通过小米厂商下发的统计 参考同上 |
|
flyme |
|
object |
通过魅族厂商下发的统计 参考同上 |
|
fcm |
|
object |
通过谷歌厂商下发的统计 参考同上 |
|
oppo |
|
object |
通过oppo厂商下发的统计 参考同上 |
|
vivo |
|
object |
通过vivo厂商下发的统计 参考同上 |
|
sms |
|
object |
短信补量下发统计 |
|
offlineIos |
|
object |
iOS离线统计 |
|
offlineAndroid |
|
object |
安卓离线统计 |
error |
|
|
String |
错误信息 |
返回示例
{
"status": 200,
"res": {
"workno": "gxd123456789",
"id": "1609hg9ho7l4a1hw8pog",
"android": {
"fetchNum": 2,
"deliverNum": 0,
"deliverFailNum": 0,
"reportNum": 0,
"reportFailNum": 0,
"clickNum": 0
},
"ios": null,
"factory": null,
"mobpush": null,
"iostcp": null,
"androidtcp": null,
"apns": null,
"huawei": null,
"xiaomi": null,
"flyme": null,
"fcm": null,
"oppo": null,
"vivo": null,
"offlineIos": null,
"offlineAndroid": null,
"sms": null
},
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
查询推送详情(按日期查询)
接口地址
http://api.push.mob.com/v3/stats/getByDay
请求方式
POST
请求头部
参数名 |
参数类型 |
参数说明 |
Content-Type |
application/json |
必要参数 |
key |
String |
Mob后台的MobAppKey |
sign |
String |
加密参数,加密规则为: md5(请求参数+MobAppSecret) |
请求示例
curl --location --request POST 'http://api.push.mob.com/v3/stats/getByDay' \
--header 'key: 2e08782eb311b' \
--header 'sign: b223342835bbb272132e8a2732c75442' \
--header 'Content-Type: application/json' \
--data-raw '{"appkey":"2e08782eb311b","day":"20230518"}'
请求参数
参数名 |
参数类型 |
参数说明 |
appkey |
String |
Mob后台的MobAppKey |
day |
String |
时间精确到小时yyyyMMdd 例如20200824 查询2020年08月24日 24号的所有推送 |
返回参数说明
参数名 |
|
参数类型 |
参数说明 |
status |
|
Int |
状态码 |
res |
|
object |
返回结果 |
|
appkey |
String |
Mob后台的MobAppKey |
|
fetchNum |
number |
总设备数 |
|
fetchNumAndroid |
number |
安卓的设备数量 |
|
fetchNumIos |
number |
iOS的推送设备数量 |
|
workNum |
number |
推送任务数量 |
|
workNumAndroid |
number |
推送给安卓的任务数量 |
|
workNumIos |
number |
推送给iOS的任务数量 |
|
deliverNumTcp |
number |
通过TCP通道(MobTech的通道)下发的数量 |
|
reportNumTcp |
number |
TCP回调的数量 |
|
clickNumTcp |
number |
TCP通道点击通知的数量 |
|
deliverNum |
number |
消息下发总数量 |
|
deliverNumAndroid |
number |
安卓消息下发数量 |
|
deliverNumIos |
number |
iOS消息下发数量 |
|
reportNum |
number |
推送回执数量 |
|
reportNumAndroid |
number |
安卓推送回执数量 |
|
reportNumIos |
number |
iOS推送回执数量(iOS 下发回执不准确仅供参考也可能为0) |
|
clickNum |
number |
推送点击数量 |
|
clickNumAndroid |
number |
安卓推送点击数量 |
|
clickNumIos |
number |
iOS推送点击数量 |
|
apiNum |
number |
api调用次数 |
|
apiNumAndroid |
number |
安卓api调用次数 |
|
apiNumIos |
number |
iOSapi调用次数 |
|
activeNum |
number |
设备活跃数量 |
|
activeNumAndroid |
number |
安卓设备活跃量 |
|
activeNumIos |
number |
iOS设备活跃数量 |
|
newDeviceNum |
number |
新增设备数量 |
|
newDeviceNumAndroid |
number |
新增安卓设备数量 |
|
newDeviceNumIos |
number |
新增iOS设备数量 |
|
onlineTimeAvg |
number |
设备平均在线时长 |
|
onlineTimeAvgAndroid |
number |
安卓设备平均在线时长 |
|
onlineTimeAvgIos |
number |
iOS设备平均在线时长 |
|
onlineTimeAll |
number |
设备在线总时长(优化中) |
|
onlineTimeAllAndroid |
number |
安卓设备在线总时长(优化中) |
|
onlineTimeAllIos |
number |
iOS设备在线总时长(优化中) |
|
openAppAvg |
number |
app平均打开次数(即启动应用次数) |
|
openAppAvgIos |
number |
iOS app平均打开次数 |
|
openAppAvgAndroid |
number |
安卓app平均打开次数 |
|
openAppAll |
number |
设备打开app总次数 |
|
openAppAllAndroid |
number |
安卓app 打开总次数 |
|
openAppAllIos |
number |
iOS app打开总次数次数 |
error |
|
String |
错误描述 |
返回示例
{
"status": 200,
"res": {
"appkey": "2e08782eb311b",
"day": "20230518",
"fetchNum": 5,
"fetchNumAndroid": 5,
"fetchNumIos": 0,
"workNum": 5,
"workNumAndroid": 5,
"workNumIos": 0,
"deliverNumTcp": 2,
"reportNumTcp": 2,
"clickNumTcp": 0,
"deliverNum": 3,
"deliverNumAndroid": 3,
"deliverNumIos": 0,
"reportNum": 2,
"reportNumAndroid": 2,
"reportNumIos": 0,
"clickNum": 0,
"clickNumAndroid": 0,
"clickNumIos": 0,
"apiNum": 0,
"apiNumAndroid": 0,
"apiNumIos": 0,
"activeNum": 2,
"activeNumAndroid": 2,
"activeNumIos": 0,
"newDeviceNum": 1,
"newDeviceNumAndroid": 1,
"newDeviceNumIos": 0,
"onlineTimeAvg": 0,
"onlineTimeAvgAndroid": 0,
"onlineTimeAvgIos": 0,
"onlineTimeAll": 0,
"onlineTimeAllAndroid": 0,
"onlineTimeAllIos": 0,
"openAppAvg": 7,
"openAppAvgAndroid": 7,
"openAppAvgIos": 0,
"openAppAll": 14,
"openAppAllAndroid": 14,
"openAppAllIos": 0
},
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
查询推送详情(查询每次下发的设备信息)
注:该接口暂只支持查精准推送的推送设备详情(例如:别名、rid、别名文件推送和rid文件推送)
接口地址
http://api.push.mob.com/v3/stats/getByDevice
请求方式
POST
请求头部
参数名 |
参数类型 |
参数说明 |
Content-Type |
application/json |
必要参数 |
key |
String |
Mob后台的MobAppKey |
sign |
String |
加密参数,加密规则为: md5(请求参数+MobAppSecret) |
请求参数
参数名 |
参数类型 |
参数说明 |
appkey |
String |
Mob后台的MobAppKey |
workId |
String |
推送的任务id |
pageIndex |
number |
页码 |
pageSize |
number |
页面条数 |
请求示例
curl --location --request POST 'http://api.push.mob.com/v3/stats/getByDevice' \
--header 'key: 2e08782eb311b' \
--header 'sign: f4050aef0ee25440d74119817aea42bf' \
--header 'Content-Type: application/json' \
--data-raw '{"appkey":"2e08782eb311b","workId":"1609fr73woqnm4lzptkw","pageIndex":1,"pageSize":20}'
返回参数说明
参数名 |
|
|
参数类型 |
说明 |
status |
|
|
Int |
状态码 |
res |
|
|
object |
返回结果 |
|
totalPages |
|
number |
返回总的页数 |
|
total |
|
number |
返回设备的总数 |
|
content |
|
object[] |
返回的下发设备信息数组 |
|
|
rid |
String |
设备的绑定id 可以在客户端打印获取 |
|
|
workId |
String |
任务id |
|
|
alias |
String |
设备别名 |
|
|
tag |
String |
标签 |
|
|
id |
String |
设备id |
|
|
patchId |
String |
推送批次id(暂时是MobTech内部自己使用的字段) |
|
|
deliver |
String[] |
下发类型如["apns"] |
|
|
deliverTime |
number |
下发次数 |
|
|
report |
String[] |
下发回执类型 |
|
|
reportTime |
number |
回执次数 |
|
|
click |
String[] |
点击类型 |
|
|
clickTime |
number |
点击次数 |
error |
|
|
String |
错误信息 |
返回示例
{
"status": 200,
"res": {
"totalPages": 1,
"total": 1,
"content": [
{
"id": "1609fr73woqnm4lzptkw65l0soev0d0b4lc",
"rid": "65l0soev0d0b4lc",
"alias": null,
"guardId": "4ac763ec-522f-4969-9789-9b7c076116a5",
"tag": null,
"workId": "1609fr73woqnm4lzptkw",
"patchId": "1609fr73woqnm4lzptkw_0_XIAOMI",
"offline": null,
"deliver": [
"mobpush"
],
"deliverTime": [
1684736743029
],
"report": [
"mobpush"
],
"reportTime": [
1684736743321
],
"click": null,
"clickTime": null
}
]
},
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
根据活动任务id查询活动任务聚合数据
接口地址
http://api.push.mob.com/v3/stats/getActivity
请求方式
POST
请求头部
参数名 |
参数类型 |
参数说明 |
Content-Type |
application/json |
必要参数 |
key |
String |
Mob后台的MobAppKey |
sign |
String |
加密参数,加密规则为: md5(请求参数+MobAppSecret) |
请求示例
// 活动任务id为用户自行设置,且唯一
curl --location --request POST 'http://api.push.mob.com/v3/stats/getActivity' \
--header 'key: 2e08782eb311b' \
--header 'sign: 03ee692eb1319994970167619cb6f721' \
--header 'Content-Type: application/json' \
--data-raw '{"appkey":"2e08782eb311b","activityWorkId":"1775565980385"}'
请求参数
参数名 |
参数类型 |
参数说明 |
appkey |
String |
Mob后台的MobAppKey |
activityWorkId |
String |
推送的活动任务id |
返回参数说明
参数名 |
|
参数类型 |
说明 |
|
status |
|
number |
200 |
|
res |
|
object[] |
res |
|
|
appkey |
string |
Mob的appkey |
|
|
activityWorkId |
string |
活动任务id |
|
|
fetchNum |
number |
目标数 |
|
|
deliverNum |
number |
下发数 |
|
|
reportNum |
number |
到达数 |
|
|
clickNum |
number |
点击数 |
|
error |
|
String |
错误信息 |
|
返回示例
{
"status": 200,
"res": {
"appkey": "2e08782eb311b",
"activityWorkId": "1775565980385",
"fetchNum": 2,
"deliverNum": 0,
"reportNum": 0,
"clickNum": 0
},
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
其他接口
校验scheme长度是否超过厂商限制
接口地址
http://api.push.mob.com/push/valid/schemeLength
请求方式
POST
请求头部
参数名 |
参数类型 |
参数说明 |
Content-Type |
application/json |
必要参数 |
key |
String |
Mob后台的MobAppKey |
sign |
String |
加密参数,加密规则为: md5(请求参数+MobAppSecret) |
请求参数
参数名 |
参数类型 |
参数说明 |
scheme |
String |
scheme地址 |
schemeDataList |
object[] |
scheme参数 |
|
key |
String |
|
value |
String |
请求示例
curl --location --request POST 'http://api.push.mob.com/push/valid/schemeLength' \
--header 'key: 2e08782eb311b' \
--header 'sign: 99729876f0c694a3229a965427100dec' \
--header 'Content-Type: application/json' \
--data-raw '{"scheme":"mlink://com.mob.mobpush.link","schemeDataList":[{"key":"key","value":"value"}]}'
返回参数说明
参数名 |
|
参数类型 |
说明 |
status |
|
Int |
状态码 |
res |
|
object [] |
返回值 |
|
channel |
string |
manufacturers |
|
maxLength |
string |
Manufacturer's maximum supported length |
|
currentLength |
string |
current length |
|
tooLong |
boolean |
Is it too long |
error |
|
string |
error message |
return example
{
"status": 200,
"res": [
{
"channel": "xiaomi",
"maxLength": 1024,
"currentLength": 137,
"tooLong": false
},
{
"channel": "oppo",
"maxLength": 2000,
"currentLength": 104,
"tooLong": false
},
{
"channel": "vivo",
"maxLength": 1024,
"currentLength": 135,
"tooLong": false
}
],
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}
FileId upload file
Note: The uploaded file is saved for one month, and a maximum of 1 million rid/alias can be uploaded at a time
interface address
http://api.push.mob.com/v3/push/uploadData
request method
POST
request header
parameter name |
Parameter Type |
Parameter Description |
Content-Type |
application/json |
required parameters |
key |
String |
MobAppKey in Mob background |
sign |
String |
Encryption parameter, the encryption rule is: md5(request parameter+MobAppSecret) |
request parameters
parameter name |
Parameter Type |
Parameter Description |
appkey |
String |
AppKey |
type |
number |
1rid;2alias |
uploadData |
string [] |
uploaded id or alias |
request example
curl --location --request POST 'http://api.push.mob.com/v3/push/uploadData' \
--header 'key: 2e08782eb311b' \
--header 'sign: 18d6c37624b203b62263d0eb5be064ce' \
--header 'Content-Type: application/json' \
--data-raw '{"appkey":"2e08782eb311b","type":1,"uploadData":["65kzjroi4idsi68","65kzmcrgi2kz85c"]}'
Return parameter description
parameter name |
|
Parameter Type |
illustrate |
status |
|
Int |
status code |
res |
|
string |
fileId |
error |
|
string |
error message |
return example
{
"status": 200,
"res": "823987349755592704",
"error": null
}
{
"status": 5801,
"res": null,
"error": "数据校验失败"
}