{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://github.com/api-evangelist/inductive-automation/blob/main/json-schema/inductive-automation-resource-record-schema.json",
  "title": "ResourceRecord",
  "description": "A generic Ignition Gateway configuration resource record. Used across all /data/api/v1/resources/ endpoints for OPC connections, tag providers, user sources, alarm profiles, databases, and more.",
  "type": "object",
  "required": ["signature", "collection"],
  "properties": {
    "signature": {
      "type": "string",
      "description": "Unique resource signature used for updates and deletes. Computed server-side and returned on read; must be passed back unchanged on mutative calls."
    },
    "collection": {
      "type": "string",
      "description": "Fully-qualified resource type identifier (e.g., 'ignition/user-source', 'com.inductiveautomation.opcua/server-config')."
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether this resource is currently active.",
      "default": true
    },
    "description": {
      "type": "string",
      "description": "Human-readable description of the resource."
    },
    "name": {
      "type": "string",
      "description": "Display name for the resource (where applicable)."
    },
    "config": {
      "type": "object",
      "description": "Resource-type-specific configuration object. Schema varies by collection type.",
      "additionalProperties": true
    },
    "data": {
      "type": "object",
      "description": "Encrypted or sensitive configuration data (e.g., secrets, passwords). For embedded secrets, populate via the encryption endpoint first.",
      "additionalProperties": true
    }
  },
  "additionalProperties": false
}
