{
    "openapi": "3.0.0",
    "info": {
        "title": "HTTPS检测 - API文档",
        "version": "1.0.0",
        "description": "查询域名是否支持https协议及SSL证书信息"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/checkssl\/index": {
            "get": {
                "summary": "HTTPS检测查询",
                "tags": [
                    "HTTPS检测"
                ],
                "description": "根据域名查询网站HTTPS信息",
                "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": "www.baidu.com",
                            "description": "域名"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "sn": {
                                            "type": "string",
                                            "example": "RSA-SHA256",
                                            "description": "签名加密方式"
                                        },
                                        "isssl": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "是否存在ssl证书，1存在，0不存在（不支持https）"
                                        },
                                        "ssl_end": {
                                            "type": "string",
                                            "example": "2021-07-26 13:31:02",
                                            "description": "证书无效到期时间"
                                        },
                                        "isexpire": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "证书是否过期，1过期，0未过期"
                                        },
                                        "issuedby": {
                                            "type": "string",
                                            "example": "Global SignOrganization Validation CA-SHA256-G2",
                                            "description": "颁发者"
                                        },
                                        "ssl_type": {
                                            "type": "string",
                                            "example": "OV",
                                            "description": "证书类型，目前只能检测域名型DV和企业型OV"
                                        },
                                        "ssl_start": {
                                            "type": "string",
                                            "example": "2020-04-02 15:04:58",
                                            "description": "证书有效开始时间"
                                        },
                                        "generic_name": {
                                            "type": "string",
                                            "example": "baidu.com",
                                            "description": "通用名称，一般为被检测域名"
                                        },
                                        "issuing_auth": {
                                            "type": "string",
                                            "example": "Global Signnv-sa",
                                            "description": "颁发机构"
                                        },
                                        "operation_organ": {
                                            "type": "string",
                                            "example": "Beijing Baidu Netcom Science Technology Co.,Ltd",
                                            "description": "运营方"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "sn": "RSA-SHA256",
                                        "isssl": 1,
                                        "ssl_end": "2021-07-26 13:31:02",
                                        "isexpire": 0,
                                        "issuedby": "Global SignOrganization Validation CA-SHA256-G2",
                                        "ssl_type": "OV",
                                        "ssl_start": "2020-04-02 15:04:58",
                                        "generic_name": "baidu.com",
                                        "issuing_auth": "Global Signnv-sa",
                                        "operation_organ": "Beijing Baidu Netcom Science Technology Co.,Ltd"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "HTTPS检测查询",
                "tags": [
                    "HTTPS检测"
                ],
                "description": "根据域名查询网站HTTPS信息",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "domain": {
                                        "type": "string",
                                        "example": "www.baidu.com",
                                        "description": "域名"
                                    }
                                },
                                "required": [
                                    "key",
                                    "domain"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "sn": {
                                            "type": "string",
                                            "example": "RSA-SHA256",
                                            "description": "签名加密方式"
                                        },
                                        "isssl": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "是否存在ssl证书，1存在，0不存在（不支持https）"
                                        },
                                        "ssl_end": {
                                            "type": "string",
                                            "example": "2021-07-26 13:31:02",
                                            "description": "证书无效到期时间"
                                        },
                                        "isexpire": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "证书是否过期，1过期，0未过期"
                                        },
                                        "issuedby": {
                                            "type": "string",
                                            "example": "Global SignOrganization Validation CA-SHA256-G2",
                                            "description": "颁发者"
                                        },
                                        "ssl_type": {
                                            "type": "string",
                                            "example": "OV",
                                            "description": "证书类型，目前只能检测域名型DV和企业型OV"
                                        },
                                        "ssl_start": {
                                            "type": "string",
                                            "example": "2020-04-02 15:04:58",
                                            "description": "证书有效开始时间"
                                        },
                                        "generic_name": {
                                            "type": "string",
                                            "example": "baidu.com",
                                            "description": "通用名称，一般为被检测域名"
                                        },
                                        "issuing_auth": {
                                            "type": "string",
                                            "example": "Global Signnv-sa",
                                            "description": "颁发机构"
                                        },
                                        "operation_organ": {
                                            "type": "string",
                                            "example": "Beijing Baidu Netcom Science Technology Co.,Ltd",
                                            "description": "运营方"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "sn": "RSA-SHA256",
                                        "isssl": 1,
                                        "ssl_end": "2021-07-26 13:31:02",
                                        "isexpire": 0,
                                        "issuedby": "Global SignOrganization Validation CA-SHA256-G2",
                                        "ssl_type": "OV",
                                        "ssl_start": "2020-04-02 15:04:58",
                                        "generic_name": "baidu.com",
                                        "issuing_auth": "Global Signnv-sa",
                                        "operation_organ": "Beijing Baidu Netcom Science Technology Co.,Ltd"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}