{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ctlogs-dev/json-schema/ctlogs-dev-bimi-list-schema.json",
  "title": "BimiList",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/ctlogs-dev-api-openapi.json#/components/schemas/BimiList",
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "domain",
        "org"
      ]
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BimiRow"
      }
    },
    "has_next": {
      "type": "boolean",
      "description": "Whether another page follows."
    },
    "next_cursor": {
      "type": "string",
      "description": "Pass as ?after= for the next page; empty on the last page."
    },
    "duration_ms": {
      "type": "integer",
      "description": "Server-side time of the query."
    },
    "history_window_days": {
      "type": "integer",
      "description": "Present on every windowed page: rows are certificates valid now or expired within this many days. Absent with archive=full."
    },
    "history_truncated": {
      "type": "boolean",
      "description": "Page 1 of a windowed list only, when known: whether older certificates exist outside the window."
    },
    "upgrade": {
      "type": "string",
      "description": "When history_truncated is true: where the window is lifted (the plans; for a Pro key, the archive=full parameter)."
    }
  },
  "required": [
    "query",
    "type",
    "rows",
    "has_next",
    "next_cursor"
  ],
  "$defs": {
    "BimiAttr": {
      "type": "object",
      "properties": {
        "oid": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "required": [
        "oid",
        "value"
      ]
    },
    "BimiRow": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "description": "VMC, CMC or empty."
        },
        "subject_o": {
          "type": "string"
        },
        "subject_cn": {
          "type": "string"
        },
        "subject_c": {
          "type": "string"
        },
        "subject_dn": {
          "type": "string"
        },
        "issuer_dn": {
          "type": "string"
        },
        "domains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "not_before": {
          "type": "string",
          "format": "date-time"
        },
        "not_after": {
          "type": "string",
          "format": "date-time"
        },
        "serial_hex": {
          "type": "string"
        },
        "sha256": {
          "type": "string"
        },
        "is_precert": {
          "type": "boolean"
        },
        "word_mark": {
          "type": "string"
        },
        "mark_type": {
          "type": "string"
        },
        "trademark_office": {
          "type": "string"
        },
        "trademark_country": {
          "type": "string"
        },
        "trademark_registration": {
          "type": "string"
        },
        "attributes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BimiAttr"
          }
        },
        "logo_url": {
          "type": "string",
          "description": "Sanitised SVG logo; absent without a logo."
        },
        "logo_hash_ok": {
          "type": "boolean"
        },
        "logo_error": {
          "type": "string"
        },
        "page_url": {
          "type": "string"
        },
        "pem_url": {
          "type": "string"
        },
        "der_url": {
          "type": "string"
        },
        "log_id": {
          "type": "string"
        },
        "log_url": {
          "type": "string"
        },
        "entry_idx": {
          "type": "integer"
        },
        "sct_ts": {
          "type": "string",
          "format": "date-time"
        },
        "parse_error": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "kind",
        "domains",
        "not_before",
        "not_after",
        "serial_hex",
        "sha256"
      ]
    }
  }
}