{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/internetdata-io/json-schema/internetdata-io-download-schema.json",
  "title": "Download",
  "description": "One download ATTEMPT, refusals included.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/internetdata-io-openapi.yaml#/components/schemas/Download",
  "type": "object",
  "required": [
    "dataset_id",
    "format",
    "outcome",
    "sample",
    "open",
    "bytes",
    "http_status",
    "apikey_id",
    "client_ip",
    "user_agent",
    "created"
  ],
  "properties": {
    "dataset_id": {
      "type": "string"
    },
    "format": {
      "type": "string"
    },
    "outcome": {
      "type": "string",
      "enum": [
        "ok",
        "unauthorized",
        "denied",
        "expired",
        "unknown",
        "unavailable"
      ]
    },
    "sample": {
      "type": "boolean",
      "description": "The evaluation sample rather than the database itself."
    },
    "open": {
      "type": "boolean",
      "description": "A download of an Open database.\n"
    },
    "bytes": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64",
      "description": "Object size at redirect time, NOT bytes delivered: the transfer is a\npresigned redirect straight to object storage, so we never observe\nhow much of it was taken.\n"
    },
    "http_status": {
      "type": [
        "integer",
        "null"
      ]
    },
    "apikey_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The key that made the request. Null when it could not be resolved."
    },
    "client_ip": {
      "type": [
        "string",
        "null"
      ]
    },
    "user_agent": {
      "type": [
        "string",
        "null"
      ]
    },
    "created": {
      "type": "string",
      "format": "date-time"
    }
  }
}