# 追踪域名
# 查询(批量查询)
URL
https://api2.sendcloud.net/api/trackDomain/list
1
HTTP请求方式
GET POST
1
参数说明
参数 | 类型 | 必选 | 说明 |
---|---|---|---|
apiUser | string | 是 | API_USER |
apiKey | string | 是 | API_KEY |
name | string | 否 | 追踪域名的名称,多个 name 用 ; 分隔 |
start | int | 否 | 查询起始位置,取值区间 [0-],默认为 0 |
limit | int | 否 | 查询个数,取值区间 [0-100],默认为 100 |
请求示例
curl -d 'apiUser=***&apiKey=***&start=0&limit=100' https://api2.sendcloud.net/api/trackDomain/list
1
返回值说明
参数 | 说明 |
---|---|
id | 追踪域名ID |
name | 追踪域名的名称 |
cname | cname是否已配置通过,true:已通过 false:未通过 |
gmtCreated | 追踪域名创建时间 |
gmtUpdated | 追踪域名修改时间 |
cname.domain | 追踪域名的主机记录 |
cname.value | 追踪域名需配置的记录值 |
https | https配置状态 true:已配置 false:未配置 |
certiValidityStart | SSL证书有效期的开始时间( yyyy-MM-dd HH:mm:ss) |
certiValidityEnd | SSL证书有效期的结束时间( yyyy-MM-dd HH:mm:ss) |
返回示例
{
"info": {
"dataList": [
{
"id": 999225,
"name": "track2.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
},
{
"id": 999224,
"name": "track.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
}
],
"total": 2,
"count": 2
},
"statusCode": 200,
"message": "request was successful",
"result": true
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# 添加
URL
https://api2.sendcloud.net/api/trackDomain/add
1
HTTP请求方式
POST
1
参数说明
参数 | 类型 | 必选 | 说明 |
---|---|---|---|
apiUser | string | 是 | API_USER |
apiKey | string | 是 | API_KEY |
name | string | 是 | 追踪域名的名称,符合域名规范要求,长度不超过255个字符 |
certContent | string | 否 | 证书内容(PEM格式) |
certKey | string | 否 | 证书私钥(PEM格式) |
说明:
- 追踪域名不能与任一发信域名相同。
- certContent 和 certKey,必须同时为空或者同时传值。
- 同一个用户最多能添加 5 个追踪域名,如需添加超过5个追踪域名,请与客服联系。
请求示例
curl -d 'apiUser=***&apiKey=**&name=test.com' https://api2.sendcloud.net/api/trackDomain/add
1
返回值说明
参数 | 说明 |
---|---|
id | 追踪域名ID |
name | 追踪域名的名称 |
cname | cname是否已配置通过,true:已通过 false:未通过 |
gmtCreated | 追踪域名创建时间 |
gmtUpdated | 追踪域名修改时间 |
cname.domain | 追踪域名的主机记录 |
cname.value | 追踪域名需配置的记录值 |
https | https配置状态 true:已配置 false:未配置 |
certiValidityStart | SSL证书有效期的开始时间( yyyy-MM-dd HH:mm:ss) |
certiValidityEnd | SSL证书有效期的结束时间( yyyy-MM-dd HH:mm:ss) |
返回示例
{
"result": true,
"statusCode": 200,
"message": "request was successful",
"info": {
data: {
"id": 999224,
"name": "track.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 修改
URL
https://api2.sendcloud.net/api/trackDomain/update
1
HTTP请求方式
post
1
参数说明
参数 | 类型 | 必选 | 说明 |
---|---|---|---|
apiUser | string | 是 | API_USER |
apiKey | string | 是 | API_KEY |
id | Integer | 是 | 追踪域名ID |
name | string | 否 | 新追踪域名的名称 |
certContent | string | 否 | 证书内容(PEM格式) |
certKey | string | 否 | 证书私钥(PEM格式) |
请求示例
curl -d 'apiUser=***&apiKey=***&id=68554&name=test.com' https://api2.sendcloud.net/api/trackDomain/update
1
返回值说明
参数 | 说明 |
---|---|
id | 追踪域名ID |
name | 追踪域名的名称 |
cname | cname是否已配置通过,true:已通过 false:未通过 |
gmtCreated | 追踪域名创建时间 |
gmtUpdated | 追踪域名修改时间 |
cname.domain | 追踪域名的主机记录 |
cname.value | 追踪域名需配置的记录值 |
https | https配置状态 true:已配置 false:未配置 |
certiValidityStart | SSL证书有效期的开始时间( yyyy-MM-dd HH:mm:ss) |
certiValidityEnd | SSL证书有效期的结束时间( yyyy-MM-dd HH:mm:ss) |
返回示例
{
"result": true,
"statusCode": 200,
"message": "request was successful",
"info": {
data: {
"id": 999224,
"name": "track.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 验证
URL
https://api2.sendcloud.net/api/trackDomain/checkConfig
1
HTTP请求方
GET POST
1
参数说明
参数 | 类型 | 必选 | 说明 |
---|---|---|---|
apiUser | string | 是 | API_USER |
apiKey | string | 是 | API_KEY |
id | string | 否 | 追踪域名ID,多个 id 用 ; 分隔 |
name | string | 否 | 追踪域名的名称,多个 name 用 ; 分隔 |
说明:
- 此接口在调用时会触发cname的状态更新。
- id 和 name 不能同时为空。
请求示例
curl -d 'apiUser=***&apiKey=***&id=68554' https://api2.sendcloud.net/api/trackDomain/checkConfig
1
返回值说明
参数 | 说明 |
---|---|
id | 追踪域名ID |
name | 追踪域名的名称 |
cname | cname是否已配置通过,true:已通过 false:未通过 |
gmtCreated | 追踪域名创建时间 |
gmtUpdated | 追踪域名修改时间 |
cname.domain | 追踪域名的主机记录 |
cname.value | 追踪域名需配置的记录值 |
https | https配置状态 true:已配置 false:未配置 |
certiValidityStart | SSL证书有效期的开始时间( yyyy-MM-dd HH:mm:ss) |
certiValidityEnd | SSL证书有效期的结束时间( yyyy-MM-dd HH:mm:ss) |
返回示例
{
"info": {
"dataList": [
{
"id": 999225,
"name": "track2.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
},
{
"id": 999224,
"name": "track.test.com",
"cname": false,
"gmtCreated": "2014-11-01 22:41:52",
"gmtUpdated": "2015-09-25 10:56:06",
"cname.domain": "test.com",
"cname.value": "test.com",
"https": false,
"certiValidityStart": "",
"certiValidityEnd": ""
}
],
"count": 2
},
"statusCode": 200,
"message": "request was successful",
"result": true
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 删除
通过此接口删除追踪域名
URL
https://api2.sendcloud.net/api/trackDomain/delete
1
HTTP请求方式
post
1
参数说明
参数 | 类型 | 必选 | 说明 |
---|---|---|---|
apiUser | string | 是 | API_USER |
apiKey | string | 是 | API_KEY |
id | Integer | 是 | 追踪域名ID |
请求示例
curl -d 'apiUser=***&apiKey=***&id=68554' https://api2.sendcloud.net/api/trackDomain/delete
1
返回值说明
参数 | 说明 |
---|---|
count | 成功删除追踪域名个数 |
返回示例
{
"statusCode": 200,
"info": {
"count": 1
},
"message": "request was successful",
"result": true
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8