{
    "openapi": "3.0.0",
    "info": {
        "title": "查询域名解析 - API文档",
        "version": "1.0.0",
        "description": "该接口可以查询域名所有的解析信息，DNS记录，例如a记录，cname，hinfo，mx，ns，ptr，soa，txt，aaaa等等。由于dns记录可以自定义，因此参数解释无法一一列出，一般为字面翻译含义。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/domain\/index": {
            "get": {
                "summary": "查询域名解析详情",
                "tags": [
                    "查询域名解析"
                ],
                "description": "",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "description": "域名",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "tianapi.com",
                            "description": "域名"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ip": {
                                            "type": "string",
                                            "example": "42.156.141.13",
                                            "description": "主机IP地址"
                                        },
                                        "ttl": {
                                            "type": "int",
                                            "example": 520,
                                            "description": "有效时间"
                                        },
                                        "host": {
                                            "type": "string",
                                            "example": "tianapi.com",
                                            "description": "主机名"
                                        },
                                        "type": {
                                            "type": "string",
                                            "example": "A",
                                            "description": "解析记录类型"
                                        },
                                        "class": {
                                            "type": "string",
                                            "example": "IN",
                                            "description": "类型"
                                        },
                                        "mname": {
                                            "type": "string",
                                            "example": "vip1.alidns.com",
                                            "description": "主域名服务器"
                                        },
                                        "retry": {
                                            "type": "int",
                                            "example": 1200,
                                            "description": "重试等待时间"
                                        },
                                        "expire": {
                                            "type": "int",
                                            "example": 1200,
                                            "description": "失效时间"
                                        },
                                        "target": {
                                            "type": "string",
                                            "example": "vip1.alidns.com",
                                            "description": "指向目标"
                                        },
                                        "refresh": {
                                            "type": "int",
                                            "example": 3600,
                                            "description": "刷新时间"
                                        },
                                        "minimum-ttl": {
                                            "type": "int",
                                            "example": 360,
                                            "description": "最小ttl值"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "ip": "42.156.141.13",
                                                "ttl": 520,
                                                "host": "tianapi.com",
                                                "type": "A",
                                                "class": "IN"
                                            },
                                            {
                                                "ttl": 86400,
                                                "host": "tianapi.com",
                                                "type": "NS",
                                                "class": "IN",
                                                "target": "vip2.alidns.com"
                                            },
                                            {
                                                "ttl": 86400,
                                                "host": "tianapi.com",
                                                "type": "NS",
                                                "class": "IN",
                                                "target": "vip1.alidns.com"
                                            },
                                            {
                                                "ttl": 520,
                                                "host": "tianapi.com",
                                                "type": "SOA",
                                                "class": "IN",
                                                "mname": "vip1.alidns.com",
                                                "retry": 1200,
                                                "rname": "hostmaster.hichina.com",
                                                "expire": 3600,
                                                "serial": 2016112017,
                                                "refresh": 3600,
                                                "minimum-ttl": 360
                                            },
                                            {
                                                "pri": 1,
                                                "ttl": 520,
                                                "host": "tianapi.com",
                                                "type": "MX",
                                                "class": "IN",
                                                "target": "mxdomain.qq.com"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询域名解析详情",
                "tags": [
                    "查询域名解析"
                ],
                "description": "",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "domain": {
                                        "type": "string",
                                        "example": "tianapi.com",
                                        "description": "域名"
                                    }
                                },
                                "required": [
                                    "key",
                                    "domain"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ip": {
                                            "type": "string",
                                            "example": "42.156.141.13",
                                            "description": "主机IP地址"
                                        },
                                        "ttl": {
                                            "type": "int",
                                            "example": 520,
                                            "description": "有效时间"
                                        },
                                        "host": {
                                            "type": "string",
                                            "example": "tianapi.com",
                                            "description": "主机名"
                                        },
                                        "type": {
                                            "type": "string",
                                            "example": "A",
                                            "description": "解析记录类型"
                                        },
                                        "class": {
                                            "type": "string",
                                            "example": "IN",
                                            "description": "类型"
                                        },
                                        "mname": {
                                            "type": "string",
                                            "example": "vip1.alidns.com",
                                            "description": "主域名服务器"
                                        },
                                        "retry": {
                                            "type": "int",
                                            "example": 1200,
                                            "description": "重试等待时间"
                                        },
                                        "expire": {
                                            "type": "int",
                                            "example": 1200,
                                            "description": "失效时间"
                                        },
                                        "target": {
                                            "type": "string",
                                            "example": "vip1.alidns.com",
                                            "description": "指向目标"
                                        },
                                        "refresh": {
                                            "type": "int",
                                            "example": 3600,
                                            "description": "刷新时间"
                                        },
                                        "minimum-ttl": {
                                            "type": "int",
                                            "example": 360,
                                            "description": "最小ttl值"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "ip": "42.156.141.13",
                                                "ttl": 520,
                                                "host": "tianapi.com",
                                                "type": "A",
                                                "class": "IN"
                                            },
                                            {
                                                "ttl": 86400,
                                                "host": "tianapi.com",
                                                "type": "NS",
                                                "class": "IN",
                                                "target": "vip2.alidns.com"
                                            },
                                            {
                                                "ttl": 86400,
                                                "host": "tianapi.com",
                                                "type": "NS",
                                                "class": "IN",
                                                "target": "vip1.alidns.com"
                                            },
                                            {
                                                "ttl": 520,
                                                "host": "tianapi.com",
                                                "type": "SOA",
                                                "class": "IN",
                                                "mname": "vip1.alidns.com",
                                                "retry": 1200,
                                                "rname": "hostmaster.hichina.com",
                                                "expire": 3600,
                                                "serial": 2016112017,
                                                "refresh": 3600,
                                                "minimum-ttl": 360
                                            },
                                            {
                                                "pri": 1,
                                                "ttl": 520,
                                                "host": "tianapi.com",
                                                "type": "MX",
                                                "class": "IN",
                                                "target": "mxdomain.qq.com"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}