{
  "openapi": "3.1.0",
  "info": {
    "title": "Connor — Continuous Internet Telemetry API",
    "version": "0.9.6",
    "description": "Raw DNS signal collection, time series snapshots, and provenance receipts."
  },
  "servers": [
    {
      "url": "https://connor.dns.drm3.network"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Connor-Key",
        "description": "API key with cnnr_ prefix"
      }
    }
  },
  "paths": {
    "/health": {
      "get": {
        "summary": "Health check",
        "security": [],
        "responses": {
          "200": {
            "description": "Service status"
          }
        }
      }
    },
    "/connor/v1/domains": {
      "get": {
        "summary": "List tracked domains",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated domain list"
          }
        }
      },
      "post": {
        "summary": "Add domain to watch list",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  },
                  "category": {
                    "type": "string"
                  }
                },
                "required": [
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Domain added"
          }
        }
      }
    },
    "/connor/v1/domains/{domain}": {
      "get": {
        "summary": "Latest raw signal for domain",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Latest snapshot"
          }
        }
      }
    },
    "/connor/v1/domains/{domain}/history": {
      "get": {
        "summary": "Snapshot history for domain",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshot list"
          }
        }
      }
    },
    "/connor/v1/domains/{domain}/provenance": {
      "get": {
        "summary": "Provenance receipts for domain",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provenance receipts"
          }
        }
      }
    },
    "/connor/v1/changes": {
      "get": {
        "summary": "Global delta feed",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "domain",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recent changes"
          }
        }
      }
    },
    "/connor/v1/scan/{domain}": {
      "post": {
        "summary": "Push scan result or trigger scan",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Scan stored"
          }
        }
      }
    }
  }
}