{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/ExperimentApiMetric", "title": "ExperimentApiMetric", "additionalProperties": false, "properties": { "completion_event": { "default": null, "description": "For retention metrics: completion event.", "allOf": [ { "$ref": "#/components/schemas/ExperimentApiEventSource" } ], "nullable": true }, "conversion_window": { "default": null, "description": "Conversion window duration.", "title": "Conversion Window", "type": "integer", "nullable": true }, "denominator": { "default": null, "description": "For ratio metrics: denominator source.", "allOf": [ { "$ref": "#/components/schemas/ExperimentApiEventSource" } ], "nullable": true }, "goal": { "default": null, "description": "Whether higher or lower values indicate success.", "allOf": [ { "$ref": "#/components/schemas/ExperimentMetricGoal" } ], "nullable": true }, "kind": { "default": "ExperimentMetric", "title": "Kind", "type": "string", "enum": [ "ExperimentMetric" ] }, "metric_type": { "$ref": "#/components/schemas/ExperimentMetricType" }, "name": { "default": null, "description": "Human-readable metric name.", "title": "Name", "type": "string", "nullable": true }, "numerator": { "default": null, "description": "For ratio metrics: numerator source.", "allOf": [ { "$ref": "#/components/schemas/ExperimentApiEventSource" } ], "nullable": true }, "retention_window_end": { "default": null, "title": "Retention Window End", "type": "integer", "nullable": true }, "retention_window_start": { "default": null, "title": "Retention Window Start", "type": "integer", "nullable": true }, "retention_window_unit": { "default": null, "allOf": [ { "$ref": "#/components/schemas/FunnelConversionWindowTimeUnit" } ], "nullable": true }, "series": { "default": null, "description": "For funnel metrics: array of EventsNode/ActionsNode steps.", "title": "Series", "items": { "$ref": "#/components/schemas/ExperimentApiEventSource" }, "type": "array", "nullable": true }, "source": { "default": null, "description": "For mean metrics: event source.", "allOf": [ { "$ref": "#/components/schemas/ExperimentApiEventSource" } ], "nullable": true }, "start_event": { "default": null, "description": "For retention metrics: start event.", "allOf": [ { "$ref": "#/components/schemas/ExperimentApiEventSource" } ], "nullable": true }, "start_handling": { "default": null, "allOf": [ { "$ref": "#/components/schemas/StartHandling" } ], "nullable": true }, "uuid": { "default": null, "description": "Unique identifier. Auto-generated if omitted.", "title": "Uuid", "type": "string", "nullable": true } }, "required": [ "metric_type" ], "type": "object" }