示例:
curl -X POST https://dnsapi.cn/Record.Create -d 'login_token=LOGIN_TOKEN&format=json&domain_id=2317346&sub_domain=@&record_type=A&record_line_id=10%3D3&value=1.1.1.1'
返回参考:
JSON:
{ "status": { "code":"1", "message":"Action completed successful", "created_at":"2015-01-19 22:17:47" }, "record": { "id":"16894439", "name":"@", "status":"enable" } }
- 字段说明:
- id: 记录ID, 即为 record_id
- name: 添加的字域名
- status: 域名记录的状态
示例:
curl -X POST https://dnsapi.cn/Record.List -d 'login_token=LOGIN_TOKEN&format=json&domain_id=2317346'
返回参考:
JSON:
{ "status": { "code": "1", "message": "Action completed successful", "created_at": "2016-08-12 17:57:55" }, "domain": { "id": 9842292, "name": "yizerowu.com", "punycode": "yizerowu.com", "grade": "DP_Free", "owner": "yizerowu@tencent.com", "ext_status": "dnserror", "ttl": 600 }, "info": { "sub_domains": "12", "record_total": "2" }, "records": [ { "id": "44146112", "name": "yizerowwwww", "line": "联通", "line_id": "10=1", "type": "A", "ttl": "600", "value": "12.3.3.3", "weight": null, "mx": "0", "enabled": "1", "status": "enabled", "monitor_status": "", "remark": "", "updated_on": "2016-08-12 17:07:05", "use_aqb": "no" }, { "id": "44146111", "name": "yizerowwwww", "line": "教育网", "line_id": "10=2", "type": "A", "ttl": "600", "value": "12.3.3.3", "weight": null, "mx": "0", "enabled": "1", "status": "enabled", "monitor_status": "", "remark": "", "updated_on": "2016-08-12 17:00:19", "use_aqb": "no" } ] }
- 字段说明:
- domain:
- id: 域名ID,即为 domain_id
- name: 域名
- punycode: punycode 转码之后的域名
- grade: 域名等级,详见 Domain.List 或 Domain.Info 接口
- owner: 域名所有者
- info:
- sub_domains: 域名记录条数
- record_total: 域名记录条数
- records:
id: 记录ID编号
name: 子域名(主机记录)
line: 解析记录的线路, 详见 Record.Line 接口
line_id: 解析记录的线路ID,详见 Record.Line 接口
type: 记录类型, 详见 Record.Type 接口
ttl: 记录的 TTL 值
value: 记录值
mx: 记录的 MX 记录值, 非 MX 记录类型,默认为 0
- enabled: 记录状态
- “0”: 禁用
- “1”: 启用
status: 系统内部标识状态, 开发者可忽略
- monitor_status: 该记录的D监控状态
- “Ok”: 服务器正常
- “Warn”: 该记录有报警, 服务器返回 4XX
- “Down”: 服务器宕机
- “”: 该记录未开启D监控
remark: 记录备注
updated_on: 记录最后更新时间
- use_aqb: 是否开通网站安全中心
- “yes”: 已经开启
- “no”: 未开启
示例:
curl -X POST https://dnsapi.cn/Record.Modify -d 'login_token=LOGIN_TOKEN&format=json&domain_id=2317346&record_id=16894439&sub_domain=www&value=3.2.2.2&record_type=A&record_line_id=10%3D3'
返回参考:
JSON:
{ "status": { "code":"1", "message":"Action completed successful", "created_at":"2015-01-18 16:53:23" }, "record": { "id":16894439, "name":"@", "value":"3.2.2.2", "status":"enable" } }
- 字段说明:
- id: 记录ID, 即为 record_id
- name: 子域名
- value”: 记录值
- status”: 记录状态
示例:
curl -X POST https://dnsapi.cn/Record.Remove -d 'login_token=LOGIN_TOKEN&format=json&domain_id=2317346&record_id=16894439'
返回参考:
JSON:
{ "status": { "code":"1", "message":"Action completed successful", "created_at":"2015-01-18 16:58:07" } }
示例:
curl -X POST https://dnsapi.cn/Record.Ddns -d 'login_token=LOGIN_TOKEN&format=json&domain_id=2317346&record_id=16894439&record_line_id=10%3D3&sub_domain=www'
返回参考:
JSON:
{ "status": { "code":"1", "message":"Action completed successful", "created_at":"2015-01-18 17:23:58" }, "record": { "id":16909160, "name":"@", "value":"111.111.111.111" } }
- 字段说明:
- id: 记录ID, 即为 record_id
- name: 子域名
- value”: 记录值
示例:
curl -X POST https://dnsapi.cn/Record.Remark -d 'login_token=LOGIN_TOKEN&format=json&domain_id=2317346&record_id=16894439&remark=test'
返回参考:
JSON:
{ "status": { "code": "1", "message": "Action completed successful", "created_at": "2015-01-18 17:32:23" } }
示例:
curl -X POST https://dnsapi.cn/Record.Info -d 'login_token=LOGIN_TOKEN&format=json&domain_id=2317346&record_id=16894439'
返回参考:
JSON:
{ "status": { "code": "1", "message": "Action completed successful", "created_at": "2016-08-12 17:51:25" }, "domain": { "id": 9842292, "domain": "yizerowu.com", "domain_grade": "DP_Free" }, "record": { "id": "44146112", "sub_domain": "yizerowwwww", "record_type": "A", "record_line": "联通", "record_line_id": "10=1", "value": "12.3.3.3", "weight": null, "mx": "0", "ttl": "600", "enabled": "1", "monitor_status": "", "remark": "", "updated_on": "2016-08-12 17:07:05", "domain_id": "9842292" } }
- 字段说明:
- domain:
- id: 域名ID,即为 domain_id
- domain: 域名
- domain_grade: 域名等级,详见 Domain.List 或 Domain.Info 接口
- record:
id: 记录ID编号
sub_domain: 子域名(主机记录)
record_type: 记录类型, 详见 Record.Type 接口
record_line: 解析记录的线路, 详见 Record.Line 接口
record_line_id: 解析记录的线路ID,详见 Record.Line 接口
value: 记录值
mx: 记录的 MX 记录值, 非 MX 记录类型,默认为 0
ttl: 记录的 TTL 值
- enabled: 记录状态
- “0”: 禁用
- “1”: 启用
- monitor_status: 该记录的D监控状态
- “Ok”: 服务器正常
- “Warn”: 该记录有报警, 服务器返回 4XX
- “Down”: 服务器宕机
- “”: 该记录未开启D监控
remark: 记录备注
updated_on: 记录最后更新时间
domain_id: 域名ID, 即为 domain_id
示例:
curl -X POST https://dnsapi.cn/Record.Status -d 'login_token=LOGIN_TOKEN&format=json&domain_id=2317346&record_id=16894439&status=disable'
返回参考:
JSON:
{ "status": { "code": "1", "message": "Action completed successful", "created_at": "2015-01-18 20:07:29" }, "record": { "id": 16909160, "name": "@", "status": "disable" } }
- 字段说明:
- id: 记录ID, 即为 record_id
- name: 子域名
- status: 记录状态