{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-xdr/json-schema/cisco-xdr-enveloped-health-schema.json",
  "title": "EnvelopedHealth",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-xdr-health-api-openapi.yml#/components/schemas/EnvelopedHealth",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HealthStatus"
      }
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ErrorMessage"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "EnvelopedHealthDataDataQuotas": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/EnvelopedHealthDataDataQuotasKeyword8148663"
      }
    },
    "EnvelopedHealthDataDataQuotasKeyword8148663": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "values": {
          "$ref": "#/$defs/EnvelopedHealthDataDataQuotasKeyword8148663Values"
        }
      },
      "additionalProperties": false,
      "required": [
        "description",
        "values"
      ]
    },
    "EnvelopedHealthDataDataQuotasKeyword8148663Values": {
      "type": "object",
      "properties": {
        "bucket_unit": {
          "type": "string",
          "enum": [
            "day",
            "hour",
            "week",
            "month",
            "minute"
          ]
        },
        "bucket_limit": {
          "type": "number",
          "format": "double"
        },
        "current_bucket_consumption": {
          "type": "number",
          "format": "double"
        },
        "current_bucket_start_time": {
          "type": "string",
          "format": "date-time"
        },
        "current_bucket_end_time": {
          "type": "string",
          "format": "date-time"
        },
        "current_bucket_limit_reached": {
          "type": "boolean"
        },
        "current_bucket_limit_reached_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "ErrorMessage": {
      "type": "object",
      "properties": {
        "module_instance_id": {
          "type": "string"
        },
        "module_type_id": {
          "type": "string"
        },
        "module_instance_state": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "fatal",
            "warning",
            "error"
          ]
        },
        "module": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "module_instance_id",
        "module_type_id",
        "code",
        "message",
        "type"
      ]
    },
    "HealthStatus": {
      "type": "object",
      "properties": {
        "module": {
          "type": "string"
        },
        "module_instance_id": {
          "type": "string"
        },
        "module_type_id": {
          "type": "string"
        },
        "module_instance_state": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/ModuleHealthStatus"
        }
      },
      "additionalProperties": false,
      "required": [
        "module",
        "module_instance_id",
        "module_type_id",
        "data"
      ]
    },
    "ModuleHealthStatus": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "unknown",
            "ok",
            "error"
          ]
        },
        "quotas": {
          "$ref": "#/$defs/EnvelopedHealthDataDataQuotas"
        }
      },
      "additionalProperties": false,
      "required": [
        "status"
      ]
    }
  }
}