{ "$schema": "http://json-schema.org/draft-04/schema#", "$id": "https://raw.githubusercontent.com/snowplow/snowplow-cli/main/internal/validation/schema/source-application.json", "type": "object", "additionalProperties": false, "description": "Defines a Source Application, representing a system (e.g., website, mobile app, backend service) that generates Snowplow events. It includes metadata about the application, its identifiers (appIds), and entities that are GLOBALLY consistent across ALL events from this source.\n\nIMPORTANT: Only include entities in 'tracked' that are meaningful and present on EVERY event from this application (e.g., web page context for websites, app context for mobile apps). Content-specific or interaction-specific entities (e.g., video context, form context, product context) should be defined in individual event specifications within data products, not here.", "required": ["apiVersion", "resourceType", "resourceName", "data"], "properties": { "apiVersion": { "enum": ["v1"] }, "resourceType": { "enum": ["source-application"] }, "resourceName": { "description": "A version 4 uuid value to identify this resource. On a mac you can generate one by typing `uuidgen` in the terminal.", "examples": [{ "resourceName": "9567c7f6-356e-4f73-a7ec-e5097e4d2f42" }], "type": "string", "format": "uuid" }, "data": { "examples": [ { "name": "Website", "appIds": ["web", "web-qa"], "entities": { "tracked": [ { "source": "iglu:org.schema/WebPage/jsonschema/1-0-0", "minCardinality": 1 }, { "source": "iglu:com.snowplowanalytics.snowplow/geolocation_context/jsonschema/1-1-0" } ], "enriched": [] } } ], "type": "object", "additionalProperties": false, "required": ["name", "entities", "appIds"], "properties": { "name": { "description": "A human readable name that will make sense when exploring your data.", "type": "string" }, "domain": { "description": "The team or area of business looking after this application.", "type": "string" }, "description": { "type": "string" }, "owner": { "description": "The primary owner of this source application.", "type": "string", "examples": [{ "owner": "owner@example.com" }], "format": "email" }, "appIds": { "description": "Identifiers that the trackers send with the different events for this application.", "type": "array", "items": { "type": "string", "maxLength": 256 } }, "entities": { "description": "The entities that will be associated with all tracking from this application.", "examples": [ { "tracked": [ { "source": "iglu:org.schema/WebPage/jsonschema/1-0-0", "minCardinality": 1 }, { "source": "iglu:com.snowplowanalytics.snowplow/geolocation_context/jsonschema/1-1-0" } ] } ], "type": "object", "additionalProperties": false, "required": ["tracked", "enriched"], "properties": { "tracked": { "description": "Entities added via tracking", "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["source"], "properties": { "source": { "$ref": "#/$defs/igluUri" }, "comment": { "type": "string" }, "minCardinality": { "type": "number", "enum": [0, 1] }, "maxCardinality": { "type": "number" } } } }, "enriched": { "description": "Entities added via enrichment", "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["source"], "properties": { "source": { "$ref": "#/$defs/igluUri" }, "comment": { "type": "string" }, "minCardinality": { "type": "number", "enum": [0, 1] }, "maxCardinality": { "type": "number" } } } } } } } } }, "$defs": { "igluUri": { "type": "string", "pattern": "^iglu:[a-zA-Z0-9-_.]+/[a-zA-Z0-9-_]+/[a-zA-Z0-9-_]+/[0-9]+-[0-9]+-[0-9]+$" } } }