{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/algolia/main/json-schema/algolia-abtest-schema.json", "title": "ABTest", "x-generated": "2026-09-23", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/algolia-abtesting-v3-api-openapi.yml#/components/schemas/ABTest", "type": "object", "additionalProperties": false, "properties": { "abTestID": { "$ref": "#/$defs/abTestID" }, "updatedAt": { "$ref": "#/$defs/updatedAt" }, "createdAt": { "$ref": "#/$defs/createdAt" }, "endAt": { "$ref": "#/$defs/endAt" }, "stoppedAt": { "$ref": "#/$defs/stoppedAt" }, "name": { "$ref": "#/$defs/name" }, "status": { "$ref": "#/$defs/Status" }, "variants": { "$ref": "#/$defs/variants" }, "configuration": { "$ref": "#/$defs/ABTestConfiguration" }, "decision": { "$ref": "#/$defs/Decision" } }, "required": [ "status", "name", "createdAt", "endAt", "updatedAt", "abTestID", "variants" ], "$defs": { "ABTestConfiguration": { "title": "configuration", "type": "object", "description": "A/B test configuration.", "properties": { "minimumDetectableEffect": { "$ref": "#/$defs/MinimumDetectableEffect" }, "filters": { "$ref": "#/$defs/MetricsFilters" }, "errorCorrection": { "$ref": "#/$defs/ErrorCorrectionType" } } }, "Decision": { "type": "object", "additionalProperties": false, "description": "Outcome of the A/B test once a winner has been declared.\nOnly present when a winning variant has been declared, so its presence indicates the test has been decided.\n", "properties": { "winnerVariantId": { "type": "integer", "description": "Identifier of the declared winning variant. The control variant is 1." }, "declaredAt": { "type": "string", "description": "Date and time when the winning variant was declared, in RFC 3339 format." } }, "required": [ "winnerVariantId", "declaredAt" ] }, "EffectMetric": { "type": "string", "description": "Metric for which you want to detect the smallest relative difference.", "enum": [ "addToCartRate", "clickThroughRate", "conversionRate", "purchaseRate", "noResultsRate" ] }, "ErrorCorrectionType": { "type": "string", "description": "Multiple-testing correction method applied when evaluating metric significance.", "enum": [ "bonferroni", "benjamini-hochberg" ] }, "MetricsFilter": { "type": "object", "additionalProperties": false, "description": "Boolean filter applied to the A/B test population. Each filter targets a boolean metric\nand decides whether to include (true) or exclude (false) matching records.\n", "properties": { "domain": { "type": "string", "description": "Metric domain (for example `abtesting`, `personalization`)." }, "name": { "type": "string", "description": "Public metric name." }, "trackEffects": { "type": "boolean", "description": "Whether the experiment should record the effects of this filter." }, "includes": { "type": "boolean", "description": "If true, keep items that match the filter; if false, exclude them." } }, "required": [ "domain", "name" ] }, "MetricsFilters": { "type": "array", "description": "List of metric filters applied to the test population.", "items": { "$ref": "#/$defs/MetricsFilter" } }, "MinimumDetectableEffect": { "type": "object", "description": "Configuration for the smallest difference between test variants you want to detect.", "properties": { "size": { "type": "number", "format": "double", "minimum": 0, "maximum": 1, "description": "Smallest difference in an observable metric between variants.\nFor example, to detect a 10% difference between variants, set this value to 0.1.\n" }, "metric": { "$ref": "#/$defs/EffectMetric" } }, "required": [ "size", "metric" ] }, "Status": { "type": "string", "description": "A/B test status.\n\n- `active`. The A/B test is live and search traffic is split between the two variants.\n- `stopped`. You stopped the A/B test. The A/B test data is still available for analysis.\n- `expired`. The A/B test was automatically stopped after reaching its end date.\n- `failed`. Creating the A/B test failed.\n", "enum": [ "active", "stopped", "expired", "failed" ] }, "abTestID": { "type": "integer", "description": "Unique A/B test identifier." }, "createdAt": { "type": "string", "description": "Date and time when the A/B test was created, in RFC 3339 format." }, "description": { "type": "string", "description": "Description for this variant." }, "endAt": { "type": "string", "description": "End date and time of the A/B test, in RFC 3339 format." }, "filterEffects": { "type": "object", "description": "A/B test filter effects resulting from configuration settings.", "properties": { "outliers": { "title": "outliersFilter", "type": "object", "description": "Outliers removed from the A/B test as a result of configuration settings.", "properties": { "usersCount": { "type": "integer", "description": "Number of users removed from the A/B test." }, "trackedSearchesCount": { "type": "integer", "description": "Number of tracked searches removed from the A/B test." } } }, "emptySearch": { "title": "emptySearchFilter", "type": "object", "description": "Empty searches removed from the A/B test as a result of configuration settings.", "properties": { "usersCount": { "type": "integer", "description": "Number of users removed from the A/B test." }, "trackedSearchesCount": { "type": "integer", "description": "Number of tracked searches removed from the A/B test." } } } } }, "index": { "type": "string", "description": "Index name of the A/B test variant (case-sensitive)." }, "metricMetadata": { "type": "object", "description": "Metric specific metadata.", "properties": { "winsorizedValue": { "type": "number", "format": "double", "description": "Only present in case the metric is 'revenue'.\nIt is the amount exceeding the 95th percentile of global revenue transactions involved in the AB Test. This amount is not considered when calculating statistical significance.\nIt is tied to a per revenue-currency pair contrary to other\nglobal filter effects (such as outliers and empty search count).\n" }, "mean": { "type": "number", "format": "double", "description": "Mean value for this metric." } } }, "metricResult": { "type": "object", "properties": { "name": { "type": "string" }, "updatedAt": { "type": "string", "description": "Date and time when the metric was last updated, in RFC 3339 format." }, "value": { "type": "number", "format": "double" }, "valueCIHigh": { "type": "number", "format": "double", "description": "The upper bound of the 95% confidence interval for the metric value. The confidence interval is calculated using\neither the relative ratio or relative difference between the metric values for the control and the variant.\nRelative ratio is used for metrics that are ratios (e.g., click-through rate, conversion rate),\nwhile relative difference is used for continuous metrics (e.g., revenue).\n" }, "valueCILow": { "type": "number", "format": "double", "description": "The lower bound of the 95% confidence interval for the metric value. The confidence interval is calculated using\neither the relative ratio or relative difference between the metric values for the control and the variant.\nRelative ratio is used for metrics that are ratios (e.g., click-through rate, conversion rate),\nwhile relative difference is used for continuous metrics (e.g., revenue).\n" }, "pValue": { "type": "number", "format": "double", "description": "PValue for the first variant (control) will always be 0. For the other variants, pValue is calculated for the current variant based on the control." }, "dimension": { "type": "string", "description": "Dimension defined during test creation." }, "metadata": { "$ref": "#/$defs/metricMetadata" }, "criticalValue": { "type": "number", "format": "double", "description": "The value that was computed during error correction. It is used to determine significance of the metric pValue.\nThe critical value is calculated using Bonferroni or Benjamini-Hochberg corrections, based on the given\nconfiguration during the A/B test creation.\n" }, "significant": { "type": "boolean", "description": "Whether the pValue is significant or not based on the critical value and the error correction algorithm used.\n" } }, "required": [ "name", "updatedAt", "value", "pValue" ] }, "metrics": { "type": "array", "description": "All ABTest metrics that were defined during test creation.", "items": { "$ref": "#/$defs/metricResult" } }, "name": { "type": "string", "description": "A/B test name." }, "stoppedAt": { "type": [ "string", "null" ], "description": "Date and time when the A/B test was stopped, in RFC 3339 format." }, "trafficPercentage": { "type": "integer", "description": "Percentage of search requests each variant receives.", "minimum": 1, "maximum": 99 }, "updatedAt": { "type": "string", "description": "Date and time when the A/B test was last updated, in RFC 3339 format." }, "variant": { "type": "object", "additionalProperties": false, "properties": { "description": { "$ref": "#/$defs/description" }, "estimatedSampleSize": { "type": "integer", "description": "Estimated number of searches required to achieve the desired statistical significance.\n\nThe A/B test configuration must include a `minimumDetectableEffect` setting for this number to be included in the response.\n" }, "index": { "$ref": "#/$defs/index" }, "trafficPercentage": { "$ref": "#/$defs/trafficPercentage" }, "metrics": { "$ref": "#/$defs/metrics" }, "metadata": { "$ref": "#/$defs/variantMetadata" }, "customSearchParameters": { "type": "object", "description": "Search parameters applied to this variant when the same index is used for multiple variants.\nOnly present if custom search parameters were provided during test creation.\n" } }, "required": [ "index", "description", "trafficPercentage", "metrics" ] }, "variantMetadata": { "type": "object", "description": "Variant specific metadata.", "properties": { "filterEffects": { "$ref": "#/$defs/filterEffects" } } }, "variants": { "type": "array", "description": "A/B test variants.\n\nThe first variant is your _control_ index, typically your production index.\nAll of the additional variants are indexes with changed settings that you want to test against the control.\n", "items": { "$ref": "#/$defs/variant" } } } }