{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://servicenow.com/schemas/servicenow/configuration-item.json",
  "title": "ServiceNow Configuration Item",
  "description": "A ServiceNow CMDB configuration item record representing a hardware, software, or service component tracked in the Configuration Management Database.",
  "type": "object",
  "required": ["sys_id", "name", "sys_class_name"],
  "properties": {
    "sys_id": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "description": "The unique 32-character system identifier for the configuration item."
    },
    "name": {
      "type": "string",
      "description": "The display name of the configuration item."
    },
    "sys_class_name": {
      "type": "string",
      "description": "The CMDB class name identifying the type of CI, such as cmdb_ci_server, cmdb_ci_appl, or cmdb_ci_service."
    },
    "category": {
      "type": ["string", "null"],
      "description": "The category of the configuration item."
    },
    "subcategory": {
      "type": ["string", "null"],
      "description": "The subcategory of the configuration item."
    },
    "short_description": {
      "type": ["string", "null"],
      "description": "A brief description of the configuration item."
    },
    "operational_status": {
      "type": "string",
      "enum": ["1", "2", "3", "4", "5", "6"],
      "description": "The operational status: 1=Operational, 2=Non-Operational, 3=Repair in Progress, 4=DR Standby, 5=Ready, 6=Retired."
    },
    "install_status": {
      "type": "string",
      "enum": ["1", "2", "3", "4", "5", "6", "7", "8", "100"],
      "description": "The install status: 1=Installed, 2=In Maintenance, 3=Pending Install, 4=Pending Repair, 5=In Stock, 6=Retired, 7=Stolen, 8=Absent, 100=On Order."
    },
    "serial_number": {
      "type": ["string", "null"],
      "maxLength": 255,
      "description": "The serial number of the hardware asset."
    },
    "asset_tag": {
      "type": ["string", "null"],
      "maxLength": 255,
      "description": "The asset tag identifier."
    },
    "ip_address": {
      "type": ["string", "null"],
      "description": "The IP address of the CI."
    },
    "mac_address": {
      "type": ["string", "null"],
      "description": "The MAC address of the CI."
    },
    "dns_domain": {
      "type": ["string", "null"],
      "description": "The DNS domain of the CI."
    },
    "fqdn": {
      "type": ["string", "null"],
      "description": "The fully qualified domain name."
    },
    "os": {
      "type": ["string", "null"],
      "description": "The operating system installed on the CI."
    },
    "os_version": {
      "type": ["string", "null"],
      "description": "The version of the operating system."
    },
    "os_domain": {
      "type": ["string", "null"],
      "description": "The OS domain."
    },
    "cpu_type": {
      "type": ["string", "null"],
      "description": "The CPU type."
    },
    "cpu_count": {
      "type": ["integer", "null"],
      "minimum": 0,
      "description": "The number of CPUs."
    },
    "cpu_speed": {
      "type": ["number", "null"],
      "description": "The CPU speed in MHz."
    },
    "ram": {
      "type": ["integer", "null"],
      "minimum": 0,
      "description": "The amount of RAM in MB."
    },
    "disk_space": {
      "type": ["number", "null"],
      "minimum": 0,
      "description": "The total disk space in GB."
    },
    "manufacturer": {
      "$ref": "#/$defs/ReferenceField",
      "description": "The manufacturer of the CI."
    },
    "model_id": {
      "$ref": "#/$defs/ReferenceField",
      "description": "The model of the CI."
    },
    "model_number": {
      "type": ["string", "null"],
      "description": "The model number."
    },
    "vendor": {
      "$ref": "#/$defs/ReferenceField",
      "description": "The vendor of the CI."
    },
    "location": {
      "$ref": "#/$defs/ReferenceField",
      "description": "The physical location of the CI."
    },
    "department": {
      "$ref": "#/$defs/ReferenceField",
      "description": "The department that owns the CI."
    },
    "company": {
      "$ref": "#/$defs/ReferenceField",
      "description": "The company that owns the CI."
    },
    "assigned_to": {
      "$ref": "#/$defs/ReferenceField",
      "description": "The user assigned to the CI."
    },
    "managed_by": {
      "$ref": "#/$defs/ReferenceField",
      "description": "The user managing the CI."
    },
    "owned_by": {
      "$ref": "#/$defs/ReferenceField",
      "description": "The user who owns the CI."
    },
    "support_group": {
      "$ref": "#/$defs/ReferenceField",
      "description": "The group responsible for supporting the CI."
    },
    "supported_by": {
      "$ref": "#/$defs/ReferenceField",
      "description": "The user providing primary support for the CI."
    },
    "discovery_source": {
      "type": ["string", "null"],
      "description": "The source that discovered or populated this CI."
    },
    "first_discovered": {
      "type": ["string", "null"],
      "format": "date-time",
      "description": "When the CI was first discovered."
    },
    "last_discovered": {
      "type": ["string", "null"],
      "format": "date-time",
      "description": "When the CI was last discovered."
    },
    "can_print": {
      "type": "boolean",
      "description": "Whether the CI can print."
    },
    "unverified": {
      "type": "boolean",
      "description": "Whether the CI is unverified."
    },
    "sys_created_on": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the record was created."
    },
    "sys_created_by": {
      "type": "string",
      "description": "The user who created the record."
    },
    "sys_updated_on": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the record was last updated."
    },
    "sys_updated_by": {
      "type": "string",
      "description": "The user who last updated the record."
    },
    "sys_mod_count": {
      "type": "integer",
      "minimum": 0,
      "description": "The number of times the record has been modified."
    }
  },
  "$defs": {
    "ReferenceField": {
      "type": ["object", "string", "null"],
      "description": "A ServiceNow reference field that can be a sys_id string or an object containing a link and value.",
      "properties": {
        "link": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to the referenced record."
        },
        "value": {
          "type": "string",
          "description": "The sys_id of the referenced record."
        },
        "display_value": {
          "type": "string",
          "description": "The display value of the referenced record."
        }
      }
    }
  }
}
