{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ctlogs-dev/json-schema/ctlogs-dev-cert-detail-schema.json",
  "title": "CertDetail",
  "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/CertDetail",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "issuer_dn": {
      "type": "string"
    },
    "subject_dn": {
      "type": "string"
    },
    "subject_cn": {
      "type": "string"
    },
    "serial_hex": {
      "type": "string"
    },
    "san_dns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "not_before": {
      "type": "string",
      "format": "date-time"
    },
    "not_after": {
      "type": "string",
      "format": "date-time"
    },
    "sig_algo": {
      "type": "string"
    },
    "pubkey_sha256": {
      "type": "string",
      "description": "SHA-256 of the public key: /v1/spki/{hash}."
    },
    "aki": {
      "type": "string",
      "description": "Authority key identifier, hex."
    },
    "issuer_ca": {
      "type": "string",
      "description": "SHA-256 of the issuing CA certificate: /v1/ca/{sha256}."
    },
    "is_ca": {
      "type": "boolean"
    },
    "ext_key_usage": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "policy_oids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "precert_sha256": {
      "type": "string"
    },
    "final_sha256": {
      "type": "string"
    },
    "precert_first_seen": {
      "oneOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "final_first_seen": {
      "oneOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "sightings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Sighting"
      }
    },
    "precert_body_archived": {
      "type": "boolean",
      "description": "The precertificate body can be downloaded."
    },
    "final_body_archived": {
      "type": "boolean",
      "description": "The final certificate body can be downloaded."
    },
    "precert_body_bytes": {
      "type": "integer"
    },
    "final_body_bytes": {
      "type": "integer"
    },
    "archive": {
      "type": "boolean",
      "description": "Read from the archive store."
    },
    "duration_ms": {
      "type": "integer"
    }
  },
  "required": [
    "id",
    "issuer_dn",
    "subject_dn",
    "serial_hex",
    "not_before",
    "not_after",
    "sightings"
  ],
  "$defs": {
    "Sighting": {
      "type": "object",
      "properties": {
        "log_id": {
          "type": "string",
          "description": "Log id, hex."
        },
        "log_url": {
          "type": "string"
        },
        "operator": {
          "type": "string"
        },
        "entry_idx": {
          "type": "integer"
        },
        "is_precert": {
          "type": "boolean"
        },
        "sct_ts": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "log_id",
        "entry_idx",
        "is_precert",
        "sct_ts"
      ]
    }
  }
}