/schedule/{scheduleId}
目录 |
/schedule/{scheduleId}
- 查询发送任务信息
URL
- {HOST}/services /schedule/{scheduleId}
支持格式
- XML(Atom)
HTTP 请求方式
- GET
认证方式
请求数限制
- true
请求参数
| 字段名称 | 是否必选 | 字段类型 | 说明 |
|---|---|---|---|
| auth | 是 | String | BASIC/APIKEY/ OAUTH 三种认证方式信息中的一种 |
| alt | 是 | String | 通过该参数,你可以改变返回值的格式,目前支持的返回值格式包括:atom(默认) ,暂不支持json |
| scheduleId | true | long | 计划任务ID |
请求字符串
无
返回结果
<?xml version="1.0" encoding="GBK"?>
<entry>
<id>http://services.unimarketing.com.cn/schedule/7110</id>
<title type="text">DJ_MY_GOD_OOK</title>
<link href="http://services.unimarketing.com.cn/schedule/7110" rel="self"></link>
<link href="http://services.unimarketing.com.cn/schedule/DJ_MY_GOD_OOK" rel="alternate"></link>
<um:messageName>我的测试DJ</um:messageName>
<um:subject>2010?8?????</um:subject>
<um:from>DJ<unimail2012@163.com></um:from>
<um:reply>unimail2012@163.com</um:reply>
<um:triggerMethod>time</um:triggerMethod>
<um:triggerCondition></um:triggerCondition>
<um:startupTime>2011-05-12 17:14:24</um:startupTime>
<um:status>completed</um:status>
<um:optimizePolicy>auto</um:optimizePolicy>
<um:analyticsPolicy>GA(OnlyGenerateTrackingURLs)</um:analyticsPolicy>
<um:domainScope>http://beijing.piaowu.com.cn</um:domainScope>
<um:domainScope>http://tianjing.piaowu.com.cn</um:domainScope>
<link href="http://services.unimarketing.com.cn/message/9989" rel="related"></link>
<link href="http://services.unimarketing.com.cn/list/5093" rel="related"></link>
<link href="http://services.unimarketing.com.cn/list/5072" rel="related"></link>
</entry>
字段说明
| 字段名称 | 意义 | 数据类型 | 备注 |
|---|---|---|---|
| id | 发送计划ID | Number | |
| title | 发送任务名称 | 字符串 | |
| um:subject | 邮件主题 | 字符串 | 需要将“<”转义为& lt; “>”转义为& gt; |
| um:from | 发送人姓名与邮件地址 | 字符串 | 格式 xxx< yyy@163.com > |
| um:from | 发送人姓名与邮件地址 | 字符串 | |
| um:reply | 回复地址 | 字符串 | |
| um:triggerMethod | 触发方式 | 字符串 | time:时间触发 |
| um:triggerCondition | 发送条件 | 字符串 | Immediately:立即发送(如是立即发送,不需要发送时间) |
| um:startupTime | 发送时间 | 字符串 | 格式:yyyy-MM-dd HH:mm:ss |
| um:status | 发送计划状态 | 字符串 |
queued 排队 0 pushing 正在推送 1 pushed 已推完 2 canceled 取消 3 failure 发送失败 4 abnormality 数据异常 5 waitting 等待发送 6 created 邮件已创建 7 creating 邮件正在创建 8 messagesQuotaReached 需要付费 9 completed 已发送 F |
| um:optimizePolicy | 启用邮件主题优化策略 | 字符串 | auto:启用自动优化策略 |
| um:analyticsPolicy | 是否生成Google分析跟踪 | 字符串 |
GA(OnlyGenerateTrackingURLs): 启用Google分析仅在邮件中生成跟踪链接; GA(BuiltinAccount): 集成系统内置Google分析帐户数据及在邮件中生成跟踪链接; GA(AuthenticatedAccount): 用户授权系统获取其Google分析帐户数据并在邮件中生成跟踪链接 |
| um:domainScope | 跟踪链接的域名 | 字符串 | 指定邮件中链接的跟踪域名 |
| um:sendType | 发送类型(发送系统系统邮件) | 字符串 |
normal计划邮件(缺省值) system系统邮件(只能发送一封) trigger 触发邮件(暂不实现), 可以发送多封,触发条件通过联系人细分实现,这里可以传递细分id 触发的联系人和细分的id只能有一个,避免发送重复的邮件。 |
| <link href=" http://www.unimarketing.com.cn/contact/{email}" rel="alternate" /> | email 系统邮件的收件人 | 字符串 |
调用示例(Java 示例)
package cn.unisoftware.api.client.example.sendTask;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.abdera.Abdera;
import org.apache.abdera.model.Entry;
import org.apache.abdera.model.Feed;
import cn.unisoftware.api.client.ApiClient;
import cn.unisoftware.api.client.utils.AtomConstants;
import cn.unisoftware.api.client.utils.XmlUtil;
/**
* @description 查询发送任务信息
* @author DJ
* @test 【true】
*/
public class QuerySendTask {
public static void main(String[] args) throws Exception {
ApiClient apiClient = ApiClient.getApiClient(false,ApiClient.AuthMode.APIKEY, new String[]{AtomConstants.apikey,AtomConstants.apisecret});
Feed feed = apiClient.querySendTaskById(19306);
XmlUtil.displayEncodeXml(feed);
}
}