{
 "openapi": "3.1.0",
 "info": {
  "title": "QChecked",
  "version": "1.0.0",
  "description": "Checks whether a public website uses post-quantum key exchange on port 443."
 },
 "servers": [
  {
   "url": "https://qchecked.org"
  }
 ],
 "paths": {
  "/api/v1/check": {
   "get": {
    "operationId": "checkSite",
    "summary": "Check a website's post-quantum key exchange",
    "parameters": [
     {
      "name": "host",
      "in": "query",
      "required": true,
      "description": "Domain name, e.g. example.org",
      "schema": {
       "type": "string",
       "maxLength": 300
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "host": {
           "type": "string"
          },
          "status": {
           "type": "string",
           "enum": [
            "pass",
            "partial",
            "fail"
           ]
          },
          "post_quantum_key_exchange": {
           "type": "boolean"
          },
          "summary": {
           "type": "string"
          },
          "tls_version": {
           "type": "string"
          },
          "key_exchange": {
           "type": [
            "string",
            "null"
           ]
          },
          "post_quantum_group": {
           "type": [
            "string",
            "null"
           ]
          },
          "certificate_valid": {
           "type": "boolean"
          },
          "certificate_signature": {
           "type": [
            "string",
            "null"
           ]
          },
          "tested_address": {
           "type": "string"
          },
          "checked_at": {
           "type": "string",
           "format": "date-time"
          },
          "cached": {
           "type": "boolean"
          },
          "scope": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     },
     "422": {
      "description": "Cannot be checked"
     },
     "429": {
      "description": "Rate limited"
     },
     "503": {
      "description": "Busy"
     }
    }
   }
  }
 }
}