{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knoxcall/json-schema/knoxcall-caroot-schema.json",
  "title": "CARoot",
  "description": "A private certificate-authority root.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/knoxcall-pki-api-openapi.yml#/components/schemas/CARoot",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "tenant_id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "description": "Machine name for the root."
    },
    "cert_pem": {
      "type": "string",
      "description": "The root certificate (PEM)."
    },
    "subject": {
      "type": "string",
      "description": "The root certificate's distinguished name."
    },
    "subject_fields": {
      "type": [
        "object",
        "null"
      ],
      "description": "Parsed distinguished-name fields, when available.",
      "additionalProperties": true
    },
    "not_before": {
      "type": "string",
      "format": "date-time"
    },
    "not_after": {
      "type": "string",
      "format": "date-time"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "retired",
        "revoked"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "sandbox": {
      "type": "boolean",
      "description": "Whether this root lives in Test (sandbox) mode."
    }
  }
}