获取任务详情。
接口说明
云拨测目前仅在杭州 region 提供服务,使用 SDK 或 OpenAPI 时请选择杭州 region 对应的服务接入点。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
否 |
地域 ID。 |
cn-hangzhou |
| TaskId |
string |
否 |
云拨测任务 ID。 |
856566a9cb2a4cafa05aa95ed0******* |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 id |
E13430A6-57A9-56E9-9D8D-28FE8DEBCA40 |
| Code |
integer |
状态码。说明 200 表示成功。 |
200 |
| Message |
string |
返回信息。 |
success |
| Data |
object |
返回结构体。 |
|
| TaskId |
string |
云拨测任务 ID。 |
5308a2691f59422c8c3b7aeccec9cd3b |
| RegionId |
string |
区域 ID |
cn-hangzhou |
| Name |
string |
拨测任务名称 |
拨测任务 |
| TaskType |
integer |
任务类型:
|
5 |
| MonitorConf |
object |
任务配置 |
|
| NetICMP |
object |
ICMP 拨测配置参数。当 TaskType 为 1 时必填。 |
|
| TargetUrl |
string |
拨测目标地址(主机)。只能是域名或者 IP 地址。 |
www.aliyun.com |
| Interval |
integer |
建立 TCP 连接的时间间隔。单位为毫秒(ms),最小值为 200,最大值为 10000,默认为 200。 |
200 |
| PackageNum |
integer |
发送 ICMP(Ping)数据包的数量。最小值为 1,最大值为 50,默认为 4。 |
4 |
| PackageSize |
integer |
发送 ICMP(Ping)数据包的大小。单位为 byte,允许设置为 32, 64, 128, 256, 512, 1024。 |
1024 |
| SplitPackage |
boolean |
是否拆分 ICMP(Ping)数据包。默认为 true。 |
true |
| Timeout |
integer |
超时时间,单位 ms,默认 20000,范围 1000~300000。 |
2000 |
| TracertEnable |
boolean |
是否开启 tracert。默认为 true。 |
true |
| TracertNumMax |
integer |
tracert 的最大跃点数。最小值为 1,最大值为 128,默认为 64。 |
64 |
| TracertTimeout |
integer |
tracert 的超时时间。单位为毫秒(ms),最小值为 1000,最大值为 300000,默认为 60000。 |
60000 |
| NetTCP |
object |
TCP 拨测的配置参数。当 TaskType 为 2 时必填。 |
|
| TargetUrl |
string |
拨测目标地址。 |
127.0.0.1:8888 |
| ConnectTimes |
integer |
单次拨测建立连接的次数,1~16 之间,默认 4。 |
4 |
| Interval |
integer |
建立 TCP 连接的时间间隔。单位为毫秒(ms),最小值为 200,最大值为 10000,默认为 200。 |
200 |
| Timeout |
integer |
TCP 拨测超时时间。单位为毫秒(ms),最小值为 1000,最大值为 300000,默认为 20000。 |
20000 |
| TracertEnable |
boolean |
是否开启 tracert。默认为 true。 |
true |
| TracertNumMax |
integer |
tracert 的最大跃点数。最小值为 1,最大值为 128,默认为 20。 |
20 |
| TracertTimeout |
integer |
tracert 的超时时间。单位为毫秒(ms),最小值为 1000,最大值为 300000,默认为 60000。 |
60000 |
| NetDNS |
object |
DNS 拨测的配置参数。当 TaskType 为 3 时必填。 |
|
| TargetUrl |
string |
拨测域名。 |
www.aliyun.com |
| DnsServerIpType |
integer |
DNS 服务器 IP 类型。
|
0 |
| NsServer |
string |
NS 服务器 IP,默认 114.114.114.114。 |
114.114.114.114 |
| QueryMethod |
integer |
DNS 查询方式,0: 递归, 1:迭代。 |
0 |
| Timeout |
integer |
DNS 拨测超时时间。单位为毫秒(ms),最小值为 1000,最大值为 45000,默认为 5000。 |
5000 |
| ApiHTTP |
object |
HTTP(S)类型任务配置信息。 |
|
| TargetUrl |
string |
拨测地址。 |
http://127.0.0.1:8090/api/list |
| Method |
string |
请求方法。
|
POST |
| RequestHeaders |
object |
HTTP 请求头。 |
|
|
string |
JSON Map 类型字符串。 |
{ "key1": "value1", "key2": "value2" } |
|
| RequestBody |
object |
HTTP 请求体。 |
|
| Content |
string |
请求体内容,为 JSON 字符串格式。当 type 为 text/plain,application/json,application/xml,text/html,content 内容转为 JSON 字符串即可。 |
text/plain |
| Type |
string |
请求体类型,支持:text/plain、application/json、application/x-www-form-urlencoded、multipart/form-data、application/xml、text/html。 |
multipart/form-data |
| ConnectTimeout |
integer |
连接超时, ms,默认 5000,范围为 1000~300000ms。 |
5000 |
| Timeout |
integer |
超时时间,ms,默认 10000,范围为 1000~300000ms。 |
10000 |
| CheckCert |
boolean |
是否校验证书,默认为否。 |
false |
| ProtocolAlpnProtocol |
integer |
ALPN 协议版本(wap 移动端并且是 HTTPS 任务时可配置): 0-default 系统默认行为 1-http/1.1 2-h2 3-off 关闭,不启用 alpn_protocol |
1 |
| FileDownload |
object |
文件下载类型任务配置。 |
|
| TargetUrl |
string |
下载链接。 |
https://******** |
| DownloadKernel |
integer |
下载内核。
|
0 |
| QuickProtocol |
integer |
Quick 协议
|
1 |
| ConnectionTimeout |
integer |
连接超时。文件下载的连接超时必须在 1000~120000ms 之间,默认 5000。 |
5000 |
| CustomHeaderContent |
object |
自定义请求头内容,JSON Map。 |
|
|
string |
JSON Map。 |
{ "key1": "value1", "key2": "value2" } |
|
| IgnoreCertificateStatusError |
integer |
证书状态错误忽略。
|
0 |
| IgnoreCertificateUntrustworthyError |
integer |
证书不可信忽略。
|
0 |
| IgnoreInvalidHostError |
integer |
主机无效错误忽略。
|
0 |
| MonitorTimeout |
integer |
监测超时时间,ms,默认 60000,范围 1000~120000ms 之间。 |
6000 |
| Redirection |
integer |
是否支持重定向。
|
0 |
| TransmissionSize |
integer |
传输大小,KB,默认 2048KB,文件下载的传输大小必须在 1~20480KB 之间。 |
2048 |
| IgnoreCertificateCanceledError |
integer |
忽略证书撤销错误。
|
0 |
| IgnoreCertificateAuthError |
integer |
忽略 CA 证书授权错误。
|
0 |
| IgnoreCertificateOutOfDateError |
integer |
忽略证书过期错误。
|
0 |
| IgnoreCertificateUsingError |
integer |
忽略证书使用错误。
|
0 |
| VerifyWay |
integer |
验证方式。
|
0 |
| ValidateKeywords |
string |
验证关键词。 |
success |
| WhiteList |
string |
DNS 劫持白名单。匹配规则支持 IP、IP 通配符、子网掩码和 CNAME,可以填写多个匹配规则,多个匹配规则以竖线(|)隔开。例如: |
www.aliyun.com:203.0.3.55|203.3.44.67 |
| Website |
object |
网站测速类型任务配置。 |
|
| TargetUrl |
string |
目标网址。 |
http://www.aliyun.com |
| AutomaticScrolling |
integer |
是否支持自动滚动屏幕,加载页面。0-否,1-是,默认为 0。 |
0 |
| CustomHeader |
integer |
自定义 header。
|
0 |
| CustomHeaderContent |
object |
自定义 header,JSON Map 格式。 |
|
|
string |
JSON Map |
{ "key1": "value1", "key2": "value2" } |
|
| DisableCache |
integer |
是否禁用缓存。
|
1 |
| DisableCompression |
integer |
通过 Accept-Encoding 字段判断是否接受压缩文件,0-不禁用,1-禁用,默认为 0。 |
0 |
| FilterInvalidIP |
integer |
是否过滤非有效 IP。
|
0 |
| IgnoreCertificateError |
integer |
是否忽略在 SSL 握手中证书校验过程中的证书错误而继续浏览。
|
0 |
| MonitorTimeout |
integer |
监测超时,单位为 ms。非必填,默认 20000。 范围为 5000~300000ms。 |
20000 |
| Redirection |
integer |
当出现重定向后,是否要继续浏览。
|
1 |
| SlowElementThreshold |
integer |
慢元素阈值,单位为 ms,默认 5000,范围为 1~300000ms。 |
5000 |
| WaitCompletionTime |
integer |
最大等待完成时间,单位为 ms,默认 5000,范围为 5000~300000ms。 |
5000 |
| VerifyStringBlacklist |
string |
验证字符串即监测页面源代码中的某个任意字符串。若客户端返回的源码中包含任一黑名单中的字符串则报 650 验证字符串失败的错误。多个字符串以竖线(|)隔开。 |
error |
| VerifyStringWhitelist |
string |
验证字符串即监测页面源代码中的某个任意字符串。客户端返回的源码必须包含所有白名单中的字符串,否则报 650 验证字符串失败的错误。多个字符串以竖线(|)隔开。 |
success |
| ElementBlacklist |
string |
在页面加载过程中如果出现元素黑名单中配置的元素,不会请求加载该元素 。 |
www.example.com/a.jpg |
| DNSHijackWhitelist |
string |
域名(例如 www.aliyun.com)解析时,解析出的 IP 地址或者 CNAME 不在 DNS 劫持白名单内,用户就会访问失败或者返回一个非 Aliyun 的目标 IP;若解析结果中的 IP 或者 CNAME 在 DNS 白名单内,则会被认定为没有发生 DNS 劫持。 填写格式: |
www.aliyun.com:203.0.3.55|203.3.44.67 |
| PageTamper |
string |
监测页面出现了域名设置之外的元素都属于页面被篡改。常见的表现形式为弹出广告、浮动广告、跳转等。 填写格式: |
www.aliyun.com:|/cc/bb/a.gif|/vv/bb/cc.jpg |
| FlowHijackJumpTimes |
integer |
识别元素:设置浏览页面元素总个数。 |
0 |
| FlowHijackLogo |
string |
劫持标识:设置匹配的关键信息。填写劫持判断关键字或关键元素,允许带星号(*)。 |
aliyun |
| Stream |
object |
流媒体拨测配置。 |
|
| TargetUrl |
string |
流媒体资源地址。 |
http://www.aliyun.com/stream/test.mp4 |
| StreamType |
integer |
音视频标志:
|
0 |
| StreamMonitorTimeout |
integer |
监测时长,单位秒,最长支持 60s,不传默认 60。 |
30 |
| StreamAddressType |
integer |
资源地址类型:
|
0 |
| PlayerType |
integer |
播放器,不传默认 12。
|
12 |
| CustomHeaderContent |
object |
自定义 header,JSON Map 格式。 |
|
|
string |
自定义 header,JSON Map 格式。 |
{ "key1": "value1", "key2": "value2" } |
|
| WhiteList |
string |
DNS 劫持白名单。匹配规则支持 IP、IP 通配符、子网掩码和 CNAME,可以填写多个匹配规则,多个匹配规则以竖线(|)隔开。例如: |
www.aliyun.com:203.0.3.55|203.3.44.67 |
| MonitorCategory |
integer |
监测点类型:
|
1 |
| Monitors |
array<object> |
监测点列表。 |
|
|
object |
监测点列表。 |
||
| CityCode |
string |
城市编码。 |
110100 |
| OperatorCode |
string |
运营商编码。 |
1 |
| ClientType |
integer |
拨测点客户端类型:
|
1 |
| Frequency |
string |
拨测频率,可选范围:1m、5m、10m、15m、20m、30m、1h、2h、3h、4h、6h、8h、12h、24h。 |
5m |
| CustomPeriod |
object |
自定义周期 |
|
| EndHour |
integer |
结束小时,0-24。 |
22 |
| StartHour |
integer |
开始小时,0-24。 |
14 |
| CommonSetting |
object |
通用设置。 |
|
| CustomHost |
object |
自定义 host。 |
|
| Hosts |
array<object> |
host 列表。 |
|
|
object |
自定义 host。 |
||
| Domain |
string |
域名。 |
www.aliyun.com |
| IpType |
integer |
IP 类型:
|
0 |
| Ips |
array |
IP 列表。 |
|
|
string |
对应的 IP。 |
10.0.114.17 |
|
| SelectType |
integer |
选择方式:
|
0 |
| IpType |
integer |
IP 类型:
|
0 |
| MonitorSamples |
integer |
是否均匀分配监测样本 :
|
0 |
| IsOpenTrace |
boolean |
是否开启链路追踪。 |
true |
| TraceClientType |
integer |
链路追踪客户端类型:
|
1 |
| XtraceRegion |
string |
链路数据上报 region。 |
cn-hangzhou |
| CustomVPCSetting |
object |
用户 VPC 信息,如果拨测的是阿里云内网地址,需要配置 VPC 信息。 |
|
| RegionId |
string |
地域 ID。 |
cn-hangzhou |
| VpcId |
string |
VPC ID. |
vpc-2zexy5nae9q2otaxxxx |
| VSwitchId |
string |
交换机 ID。 |
vsw-bp1i0xezblf1yrz4xxxxx |
| SecureGroupId |
string |
安全组 ID,此安全组是拨测客户端所在的安全组,安全组限定了拨测客户端在 VPC 中的出入站规则。需要设置您的 VPC 所在安全组的入站规则为允许拨测客户端所在的安全组访问。否则,拨测客户端无法顺畅地访问您的 VPC 内资源。 |
sg-xxxxxxx |
| CustomPrometheusSetting |
object |
保留字段。 |
|
| PrometheusLabels |
object |
保留字段。 |
|
|
string |
保留字段。 |
保留字段。 |
|
| PrometheusClusterId |
string |
保留字段。 |
保留字段。 |
| PrometheusClusterRegion |
string |
保留字段。 |
保留字段。 |
| AvailableAssertions |
array<object> |
断言列表。 |
|
|
object |
断言列表。 |
||
| Type |
string |
断言类型,包括:HttpResCode、HttpResHead、HttpResBody、HttpResBodyJson、HttpResponseTime、IcmpPackLoss(丢包率)、IcmpPackMaxLatency(最大包延时 ms)、IcmpPackAvgLatency(平均延时)、TraceRouteHops(跃点数目)、DnsARecord(A 记录)、DnsCName(Cname)、websiteTTFB(首包时间)、websiteTTLB(尾包时间)、websiteFST(首屏时间)、websiteFFST(首屏完全渲染时间)、websiteOnload(完全加载时间),具体使用见下文补充说明。 |
websiteTTLB |
| Target |
string |
检查目标,当为 HttpResCode 与 HttpResBody、HttpResponseTime 时,target 不需要填,当为 HttpResHead 时,需指定 header 中的 key,当为 HttpResBodyJson 时,使用 jsonPath。 |
key |
| Operator |
string |
条件:
|
gt |
| Expect |
string |
期望值。 |
100 |
| Status |
string |
|
RUNNING |
| ResourceGroupId |
string |
资源组 ID。 |
default |
| Tags |
array<object> |
标签。 |
|
|
object |
标签。 |
||
| Key |
string |
Tag 的键。 |
user1 |
| Value |
string |
Tag 的值 |
p_运维 |
示例
正常返回示例
JSON格式
{
"RequestId": "E13430A6-57A9-56E9-9D8D-28FE8DEBCA40",
"Code": 200,
"Message": "success",
"Data": {
"TaskId": "5308a2691f59422c8c3b7aeccec9cd3b",
"RegionId": "cn-hangzhou",
"Name": "拨测任务",
"TaskType": 5,
"MonitorConf": {
"NetICMP": {
"TargetUrl": "www.aliyun.com",
"Interval": 200,
"PackageNum": 4,
"PackageSize": 1024,
"SplitPackage": true,
"Timeout": 2000,
"TracertEnable": true,
"TracertNumMax": 64,
"TracertTimeout": 60000
},
"NetTCP": {
"TargetUrl": "127.0.0.1:8888",
"ConnectTimes": 4,
"Interval": 200,
"Timeout": 20000,
"TracertEnable": true,
"TracertNumMax": 20,
"TracertTimeout": 60000
},
"NetDNS": {
"TargetUrl": "www.aliyun.com",
"DnsServerIpType": 0,
"NsServer": "114.114.114.114",
"QueryMethod": 0,
"Timeout": 5000
},
"ApiHTTP": {
"TargetUrl": "http://127.0.0.1:8090/api/list",
"Method": "POST",
"RequestHeaders": {
"key": "{\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n}"
},
"RequestBody": {
"Content": "text/plain",
"Type": "multipart/form-data"
},
"ConnectTimeout": 5000,
"Timeout": 10000,
"CheckCert": false,
"ProtocolAlpnProtocol": 1
},
"FileDownload": {
"TargetUrl": "https://********",
"DownloadKernel": 0,
"QuickProtocol": 1,
"ConnectionTimeout": 5000,
"CustomHeaderContent": {
"key": "{\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n}"
},
"IgnoreCertificateStatusError": 0,
"IgnoreCertificateUntrustworthyError": 0,
"IgnoreInvalidHostError": 0,
"MonitorTimeout": 6000,
"Redirection": 0,
"TransmissionSize": 2048,
"IgnoreCertificateCanceledError": 0,
"IgnoreCertificateAuthError": 0,
"IgnoreCertificateOutOfDateError": 0,
"IgnoreCertificateUsingError": 0,
"VerifyWay": 0,
"ValidateKeywords": "success",
"WhiteList": "www.aliyun.com:203.0.3.55|203.3.44.67"
},
"Website": {
"TargetUrl": "http://www.aliyun.com",
"AutomaticScrolling": 0,
"CustomHeader": 0,
"CustomHeaderContent": {
"key": "{\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n}\n"
},
"DisableCache": 1,
"DisableCompression": 0,
"FilterInvalidIP": 0,
"IgnoreCertificateError": 0,
"MonitorTimeout": 20000,
"Redirection": 1,
"SlowElementThreshold": 5000,
"WaitCompletionTime": 5000,
"VerifyStringBlacklist": "error",
"VerifyStringWhitelist": "success",
"ElementBlacklist": "www.example.com/a.jpg",
"DNSHijackWhitelist": "www.aliyun.com:203.0.3.55|203.3.44.67",
"PageTamper": "www.aliyun.com:|/cc/bb/a.gif|/vv/bb/cc.jpg",
"FlowHijackJumpTimes": 0,
"FlowHijackLogo": "aliyun"
},
"Stream": {
"TargetUrl": "http://www.aliyun.com/stream/test.mp4",
"StreamType": 0,
"StreamMonitorTimeout": 30,
"StreamAddressType": 0,
"PlayerType": 12,
"CustomHeaderContent": {
"key": "{\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n}"
},
"WhiteList": "www.aliyun.com:203.0.3.55|203.3.44.67"
}
},
"MonitorCategory": 1,
"Monitors": [
{
"CityCode": "110100",
"OperatorCode": "1",
"ClientType": 1
}
],
"Frequency": "5m",
"CustomPeriod": {
"EndHour": 22,
"StartHour": 14
},
"CommonSetting": {
"CustomHost": {
"Hosts": [
{
"Domain": "www.aliyun.com",
"IpType": 0,
"Ips": [
"10.0.114.17"
]
}
],
"SelectType": 0
},
"IpType": 0,
"MonitorSamples": 0,
"IsOpenTrace": true,
"TraceClientType": 1,
"XtraceRegion": "cn-hangzhou",
"CustomVPCSetting": {
"RegionId": "cn-hangzhou",
"VpcId": "vpc-2zexy5nae9q2otaxxxx",
"VSwitchId": "vsw-bp1i0xezblf1yrz4xxxxx",
"SecureGroupId": "sg-xxxxxxx"
},
"CustomPrometheusSetting": {
"PrometheusLabels": {
"key": "保留字段。"
},
"PrometheusClusterId": "保留字段。",
"PrometheusClusterRegion": "保留字段。"
}
},
"AvailableAssertions": [
{
"Type": "websiteTTLB",
"Target": "key\n",
"Operator": "gt",
"Expect": "100"
}
],
"Status": "RUNNING",
"ResourceGroupId": "default",
"Tags": [
{
"Key": "user1",
"Value": "p_运维"
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ParameterMissing | %s | |
| 400 | ParameterIllegal | %s | |
| 400 | TaskQuotaLimit | %s | |
| 400 | ParameterRegionIllegal | %s | |
| 400 | DuplicateTagKey | Param tagKey is duplicate. | |
| 400 | TagNumOUT | the number of tag is out . | |
| 400 | NoPermissionUSER | user no permission | |
| 403 | RAMNotAuthorize | %s | |
| 403 | STSNotAuthorize | %s | |
| 403 | IllegalUserAccess | %s | |
| 403 | APINotAuthorize | %s | |
| 403 | CommercialStatusException | %s | |
| 403 | SyntheticTrailExpired | %s | |
| 403 | SyntheticInDebt | %s | |
| 403 | SyntheticDailyTimesExhausted | %s | |
| 403 | SyntheticDailyLimit | %s |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。