{ "openapi": "3.0.4", "info": { "title": "A/B Testing API", "description": "## Base URLs\n\nBase URLs for the A/B testing API:\n\n- \u0060https://analytics.us.algolia.com\u0060\n- \u0060https://analytics.de.algolia.com\u0060\n- \u0060https://analytics.algolia.com\u0060 (routes requests to the closest of the above servers, based on your geographical location)\n\nUse the URL that matches your [analytics region](https://dashboard.algolia.com/account/infrastructure/analytics).\n\n**All requests must use HTTPS.**\n\n## Availability and authentication\n\nAccess to the A/B testing API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing).\n\nAdd these headers to authenticate requests:\n\n- \u0060x-algolia-application-id\u0060. Your Algolia application ID.\n- \u0060x-algolia-api-key\u0060. An API key with the necessary permissions to make the request.\n The required access control list (ACL) to make a request is listed in each endpoint\u0027s reference.\n\nYou can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account/api-keys).\n\n## Rate limits\n\nYou can make up to **100 requests per minute per app** to the A/B testing API.\nThe response includes headers with information about the limits.\n\n## Parameters\n\nQuery parameters must be [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding).\nNon-ASCII characters must be UTF-8 encoded.\nPlus characters (\u0060\u002B\u0060) are interpreted as spaces.\n\n## Response status and errors\n\nThe A/B testing API returns JSON responses.\nSince JSON doesn\u0027t guarantee any specific ordering, don\u0027t rely on the order of attributes in the API response.\n\nSuccessful responses return \u00602xx\u0060 statuses. Client errors return \u00604xx\u0060 statuses. Server errors return \u00605xx\u0060 statuses.\nError responses have a \u0060message\u0060 property with more information.\n\n## Version\n\nThe current version of the A/B Testing API is version 3, indicated by the \u0060/3/\u0060 in each endpoint\u0027s URL.\n", "version": "3.0.0" }, "servers": [ { "url": "https://analytics.{region}.algolia.com", "variables": { "region": { "default": "us", "enum": [ "us", "de" ] } } } ], "paths": { "/{path}": { "get": { "tags": [ "abtesting-v3" ], "summary": "Send requests to the Algolia REST API", "description": "This method lets you send requests to the Algolia REST API.", "operationId": "CustomGet", "parameters": [ { "name": "path", "in": "path", "description": "Path of the endpoint, for example \u00601/newFeature\u0060.", "required": true, "schema": { "type": "string", "example": "/keys" } }, { "$ref": "#/components/parameters/Parameters" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomGet200ResponseSchema" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "$ref": "#/components/responses/IndexNotFound" } } }, "post": { "tags": [ "abtesting-v3" ], "summary": "Send requests to the Algolia REST API", "description": "This method lets you send requests to the Algolia REST API.", "operationId": "CustomPost", "parameters": [ { "name": "path", "in": "path", "description": "Path of the endpoint, for example \u00601/newFeature\u0060.", "required": true, "schema": { "type": "string", "example": "/keys" } }, { "$ref": "#/components/parameters/Parameters" } ], "requestBody": { "description": "Parameters to send with the custom request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomPostRequestRequestBody" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomPost200ResponseSchema" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "$ref": "#/components/responses/IndexNotFound" } } }, "put": { "tags": [ "abtesting-v3" ], "summary": "Send requests to the Algolia REST API", "description": "This method lets you send requests to the Algolia REST API.", "operationId": "CustomPut", "parameters": [ { "name": "path", "in": "path", "description": "Path of the endpoint, for example \u00601/newFeature\u0060.", "required": true, "schema": { "type": "string", "example": "/keys" } }, { "$ref": "#/components/parameters/Parameters" } ], "requestBody": { "description": "Parameters to send with the custom request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomPutRequestRequestBody" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomPut200ResponseSchema" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "$ref": "#/components/responses/IndexNotFound" } } }, "delete": { "tags": [ "abtesting-v3" ], "summary": "Send requests to the Algolia REST API", "description": "This method lets you send requests to the Algolia REST API.", "operationId": "CustomDelete", "parameters": [ { "name": "path", "in": "path", "description": "Path of the endpoint, for example \u00601/newFeature\u0060.", "required": true, "schema": { "type": "string", "example": "/keys" } }, { "$ref": "#/components/parameters/Parameters" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomDelete200ResponseSchema" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "$ref": "#/components/responses/IndexNotFound" } } } }, "/3/abtests": { "post": { "tags": [ "abtesting-v3" ], "summary": "Create an A/B test", "description": "Creates a new A/B test.", "operationId": "AddAbTests", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddAbTestsRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "headers": { "x-ratelimit-limit": { "$ref": "#/components/headers/x-ratelimit-limit" }, "x-ratelimit-remaining": { "$ref": "#/components/headers/x-ratelimit-remaining" }, "x-ratelimit-reset": { "$ref": "#/components/headers/x-ratelimit-reset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbTestResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "$ref": "#/components/responses/IndexNotFound" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "x-acl": [ "editSettings" ] }, "get": { "tags": [ "abtesting-v3" ], "summary": "List all A/B tests", "description": "Lists all A/B tests you configured for this application.", "operationId": "ListAbTests", "parameters": [ { "name": "offset", "in": "query", "description": "Position of the first item to return.", "schema": { "minimum": 0, "type": "integer", "default": 0 } }, { "name": "limit", "in": "query", "description": "Number of items to return.", "schema": { "type": "integer", "default": 10 } }, { "name": "indexPrefix", "in": "query", "description": "Index name prefix. Only A/B tests for indices starting with this string are included in the response.", "schema": { "type": "string" }, "example": "dev_" }, { "name": "indexSuffix", "in": "query", "description": "Index name suffix. Only A/B tests for indices ending with this string are included in the response.", "schema": { "type": "string" }, "example": "_development" }, { "name": "direction", "in": "query", "description": "Sort order for A/B tests by start date.\nUse \u0027asc\u0027 for ascending or \u0027desc\u0027 for descending. Active A/B tests are always listed first.\n", "schema": { "$ref": "#/components/schemas/Direction" }, "example": "desc" }, { "$ref": "#/components/parameters/Methods" } ], "responses": { "200": { "description": "OK", "headers": { "x-ratelimit-limit": { "$ref": "#/components/headers/x-ratelimit-limit" }, "x-ratelimit-remaining": { "$ref": "#/components/headers/x-ratelimit-remaining" }, "x-ratelimit-reset": { "$ref": "#/components/headers/x-ratelimit-reset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListAbTestsResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "$ref": "#/components/responses/IndexNotFound" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "x-acl": [ "analytics" ] } }, "/3/abtests/{id}": { "get": { "tags": [ "abtesting-v3" ], "summary": "Retrieve A/B test details", "description": "Retrieves the details for an A/B test by its ID.", "operationId": "GetAbTest", "parameters": [ { "name": "id", "in": "path", "description": "Unique A/B test identifier.", "required": true, "schema": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 } }, { "$ref": "#/components/parameters/Methods" } ], "responses": { "200": { "description": "OK", "headers": { "x-ratelimit-limit": { "$ref": "#/components/headers/x-ratelimit-limit" }, "x-ratelimit-remaining": { "$ref": "#/components/headers/x-ratelimit-remaining" }, "x-ratelimit-reset": { "$ref": "#/components/headers/x-ratelimit-reset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbTest" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "$ref": "#/components/responses/IndexNotFound" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "x-acl": [ "analytics" ] }, "delete": { "tags": [ "abtesting-v3" ], "summary": "Delete an A/B test", "description": "Deletes an A/B test by its ID.", "operationId": "DeleteAbTest", "parameters": [ { "name": "id", "in": "path", "description": "Unique A/B test identifier.", "required": true, "schema": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 } } ], "responses": { "200": { "description": "OK", "headers": { "x-ratelimit-limit": { "$ref": "#/components/headers/x-ratelimit-limit" }, "x-ratelimit-remaining": { "$ref": "#/components/headers/x-ratelimit-remaining" }, "x-ratelimit-reset": { "$ref": "#/components/headers/x-ratelimit-reset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbTestResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "$ref": "#/components/responses/IndexNotFound" } }, "x-acl": [ "editSettings" ] } }, "/3/abtests/{id}/stop": { "post": { "tags": [ "abtesting-v3" ], "summary": "Stop an A/B test", "description": "Stops an A/B test by its ID.\n\nYou can\u0027t restart stopped A/B tests.\n", "operationId": "StopAbTest", "parameters": [ { "name": "id", "in": "path", "description": "Unique A/B test identifier.", "required": true, "schema": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 } } ], "responses": { "200": { "description": "OK", "headers": { "x-ratelimit-limit": { "$ref": "#/components/headers/x-ratelimit-limit" }, "x-ratelimit-remaining": { "$ref": "#/components/headers/x-ratelimit-remaining" }, "x-ratelimit-reset": { "$ref": "#/components/headers/x-ratelimit-reset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbTestResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "$ref": "#/components/responses/IndexNotFound" } }, "x-acl": [ "editSettings" ] } }, "/3/abtests/estimate": { "post": { "tags": [ "abtesting-v3" ], "summary": "Estimate the sample size and duration of an A/B test", "description": "Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.", "operationId": "EstimateAbTest", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateAbTestRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "headers": { "x-ratelimit-limit": { "$ref": "#/components/headers/x-ratelimit-limit" }, "x-ratelimit-remaining": { "$ref": "#/components/headers/x-ratelimit-remaining" }, "x-ratelimit-reset": { "$ref": "#/components/headers/x-ratelimit-reset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateAbTestResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "$ref": "#/components/responses/IndexNotFound" } }, "x-acl": [ "analytics" ] } }, "/3/abtests/{id}/timeseries": { "get": { "tags": [ "abtesting-v3" ], "summary": "Retrieve timeseries of an A/B test", "description": "Retrieves timeseries for an A/B test by its ID.", "operationId": "GetTimeseries", "parameters": [ { "name": "id", "in": "path", "description": "Unique A/B test identifier.", "required": true, "schema": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 } }, { "$ref": "#/components/parameters/StartDate" }, { "$ref": "#/components/parameters/EndDate" }, { "name": "metric", "in": "query", "description": "Metrics to retrieve, as a comma-separated list. If not specified, all metrics are returned.", "explode": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MetricName" } } }, { "$ref": "#/components/parameters/Methods" } ], "responses": { "200": { "description": "OK", "headers": { "x-ratelimit-limit": { "$ref": "#/components/headers/x-ratelimit-limit" }, "x-ratelimit-remaining": { "$ref": "#/components/headers/x-ratelimit-remaining" }, "x-ratelimit-reset": { "$ref": "#/components/headers/x-ratelimit-reset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Timeseries" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "$ref": "#/components/responses/IndexNotFound" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "x-acl": [ "analytics" ] } }, "/3/abtests/{id}/settings": { "get": { "tags": [ "abtesting-v3" ], "summary": "Retrieve captured A/B test settings", "description": "Retrieves the settings captured for each variant of an A/B test, and whether another active A/B test is using the control index.\n\nSettings are captured by the \u0060saveVariantSettings\u0060 operation. The response includes an entry for the control (variant 1) alongside the captured variant, so the control\u0027s original configuration can be restored later.\n\nReturns \u0060404\u0060 if the A/B test doesn\u0027t exist or no settings have been captured for it.\n", "operationId": "GetAbTestSettings", "parameters": [ { "name": "id", "in": "path", "description": "Unique A/B test identifier.", "required": true, "schema": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 } } ], "responses": { "200": { "description": "OK", "headers": { "x-ratelimit-limit": { "$ref": "#/components/headers/x-ratelimit-limit" }, "x-ratelimit-remaining": { "$ref": "#/components/headers/x-ratelimit-remaining" }, "x-ratelimit-reset": { "$ref": "#/components/headers/x-ratelimit-reset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbTestSettingsResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "description": "A/B test or captured settings not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBase" } } } }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "x-acl": [ "analytics" ] } }, "/3/abtests/{id}/settings/{variantId}": { "post": { "tags": [ "abtesting-v3" ], "summary": "Capture a variant\u0027s settings and stop the A/B test", "description": "Captures the settings of the given variant and of the control, then stops the A/B test.\n\nThe captured settings can later be applied to the control index with the \u0060applyVariantSettings\u0060 operation, and read back with the \u0060getABTestSettings\u0060 operation.\n\nThe A/B test must have reached 80% of its planned duration. Earlier requests return \u0060400\u0060.\n\nSettings can only be captured once per A/B test. A second request returns \u0060409\u0060.\n\n\u0060synonyms\u0060 and \u0060enableRules\u0060 are not captured, so applying the captured settings never changes them on the control index.\n", "operationId": "SaveVariantSettings", "parameters": [ { "name": "id", "in": "path", "description": "Unique A/B test identifier.", "required": true, "schema": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 } }, { "name": "variantId", "in": "path", "description": "One-based index of the A/B test variant. The control is variant 1.", "required": true, "schema": { "minimum": 1, "type": "integer", "example": 2 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveSettingsRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "headers": { "x-ratelimit-limit": { "$ref": "#/components/headers/x-ratelimit-limit" }, "x-ratelimit-remaining": { "$ref": "#/components/headers/x-ratelimit-remaining" }, "x-ratelimit-reset": { "$ref": "#/components/headers/x-ratelimit-reset" } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "description": "A/B test, variant, or index not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBase" } } } }, "409": { "$ref": "#/components/responses/Conflict" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "x-acl": [ "analytics", "editSettings" ] } }, "/3/abtests/{id}/settings/{variantId}/apply": { "post": { "tags": [ "abtesting-v3" ], "summary": "Apply a variant\u0027s captured settings to the control index", "description": "Applies the captured settings of the given variant to the control index.\n\nThe settings must first be captured with the \u0060saveVariantSettings\u0060 operation. To revert previously applied settings on the control index, use this operation with the control variant (variant 1).\n\nSettings can be applied up to 14 days after the A/B test ends, and reverted up to 15 days after. Later requests return \u0060400\u0060.\n\nEach set of captured settings can only be applied once, and settings that were reverted can\u0027t be applied again. Both cases return \u0060400\u0060.\n\nThe control index must not be in use by an active A/B test. Otherwise, the request returns \u0060422\u0060.\n", "operationId": "ApplyVariantSettings", "parameters": [ { "name": "id", "in": "path", "description": "Unique A/B test identifier.", "required": true, "schema": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 } }, { "name": "variantId", "in": "path", "description": "One-based index of the A/B test variant. The control is variant 1.", "required": true, "schema": { "minimum": 1, "type": "integer", "example": 2 } } ], "responses": { "200": { "description": "OK", "headers": { "x-ratelimit-limit": { "$ref": "#/components/headers/x-ratelimit-limit" }, "x-ratelimit-remaining": { "$ref": "#/components/headers/x-ratelimit-remaining" }, "x-ratelimit-reset": { "$ref": "#/components/headers/x-ratelimit-reset" } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "402": { "$ref": "#/components/responses/FeatureNotEnabled" }, "403": { "$ref": "#/components/responses/MethodNotAllowed" }, "404": { "description": "A/B test, variant, or index not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBase" } } } }, "422": { "$ref": "#/components/responses/UnprocessableEntity" } }, "x-acl": [ "analytics", "editSettings" ] } }, "/setClientApiKey": { "get": { "tags": [ "abtesting-v3" ], "summary": "Switch the API key used to authenticate requests", "description": "Switch the API key used to authenticate requests.\n", "operationId": "SetClientApiKey", "parameters": [ { "name": "apiKey", "in": "query", "description": "API key to use for subsequent requests.", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content." } }, "x-helper": true, "x-asynchronous-helper": false, "x-acl": [] } } }, "components": { "schemas": { "ErrorBase": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid Application-Id or API-Key" } }, "description": "Error.", "x-keep-model": true }, "Direction": { "enum": [ "asc", "desc" ], "type": "string", "description": "Sort order for A/B tests by start date.\nUse \u0027asc\u0027 for ascending or \u0027desc\u0027 for descending.\nActive A/B tests are always listed first.\n", "example": "desc", "x-ms-enum": { "name": "Direction", "modelAsString": false, "values": [ { "value": "asc", "name": "Asc" }, { "value": "desc", "name": "Desc" } ] } }, "AnalysisMethod": { "enum": [ "bayesian", "frequentist" ], "type": "string", "description": "A/B test statistical analysis method.\nWhen omitted, new A/B tests use \u0060bayesian\u0060.\nThey use \u0060frequentist\u0060 instead only if no primary metric that supports Bayesian analysis is available.\nThe selected method is saved in the A/B test configuration.\nOlder A/B tests, created before methods were saved, may have no method in their configuration.\nThese tests use \u0060frequentist\u0060.\n", "x-ms-enum": { "name": "AnalysisMethod", "modelAsString": false, "values": [ { "value": "bayesian", "name": "Bayesian" }, { "value": "frequentist", "name": "Frequentist" } ] } }, "StoppedAt": { "type": "string", "description": "Date and time when the A/B test was stopped, in RFC 3339 format.", "nullable": true, "example": "2023-06-15T15:06:44.400601Z" }, "Status": { "enum": [ "active", "stopped", "expired", "failed" ], "type": "string", "description": "A/B test status.\n\n- \u0060active\u0060. The A/B test is live and search traffic is split between the two variants.\n- \u0060stopped\u0060. You stopped the A/B test. The A/B test data is still available for analysis.\n- \u0060expired\u0060. The A/B test was automatically stopped after reaching its end date.\n- \u0060failed\u0060. Creating the A/B test failed.\n", "example": "active", "x-ms-enum": { "name": "Status", "modelAsString": false, "values": [ { "value": "active", "name": "Active" }, { "value": "stopped", "name": "Stopped" }, { "value": "expired", "name": "Expired" }, { "value": "failed", "name": "Failed" } ] } }, "MetricMetadata": { "type": "object", "properties": { "winsorizedValue": { "type": "number", "description": "Only present for \u0060revenue\u0060 metrics.\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", "format": "double" }, "mean": { "type": "number", "description": "Mean value for this metric.", "format": "double", "example": 53.7 }, "userCount": { "type": "integer", "description": "Only present for \u0060winsorized_revenue_per_user\u0060.\nNumber of tracked users in this variant with a tracked purchase in the metric\u0027s currency (\u0060dimension\u0060), plus tracked users with no tracked purchase in any currency.\nUsers who purchased only in other currencies are excluded.\nIt\u0027s the sample size behind the mean, p-value, and intervals, and differs from the overall \u0060user_count\u0060 metric.\nOmitted when the variant has no record for that currency.\n", "format": "int64", "example": 4100 } }, "description": "Metric specific metadata.", "example": { "winsorizedValue": 888.8, "mean": 53.7 } }, "EvidenceStatus": { "enum": [ "enough", "not_enough", "collecting", "no_data", "unavailable" ], "type": "string", "description": "Whether this variant metric\u0027s result is trustworthy yet.\nThis doesn\u0027t mean the A/B test has ended, and it doesn\u0027t declare a winning variant.\n\n- \u0060enough\u0060. Enough evidence has accumulated to trust this metric\u0027s result for this variant.\n- \u0060not_enough\u0060. Evidence was computed but hasn\u0027t reached the threshold yet.\n- \u0060collecting\u0060. Evidence is still accumulating, so it\u0027s too early to report a verdict.\n- \u0060no_data\u0060. No usable data for this variant metric, and none is expected for it.\n- \u0060unavailable\u0060. Evidence can\u0027t be computed for this variant metric\u0027s comparison.\n", "example": "not_enough", "x-ms-enum": { "name": "EvidenceStatus", "modelAsString": false, "values": [ { "value": "enough", "name": "Enough" }, { "value": "not_enough", "name": "NotEnough" }, { "value": "collecting", "name": "Collecting" }, { "value": "no_data", "name": "NoData" }, { "value": "unavailable", "name": "Unavailable" } ] } }, "MetricEvidence": { "required": [ "status" ], "type": "object", "properties": { "status": { "$ref": "#/components/schemas/EvidenceStatus" } }, "description": "Evidence status for this variant metric\u0027s comparison with the control.\nOnly present when the API has an evidence status for the comparison. Omitted when evidence isn\u0027t applicable or no status exists.\n" }, "BayesianMetricResult": { "type": "object", "properties": { "probabilityToBeBetter": { "type": "number", "description": "Probability that this variant is better than the control.", "format": "double", "example": 0.991 }, "relativeEffectCILow": { "type": "number", "description": "Lower bound of the 95% credible interval for the relative effect (variant/control minus 1).", "format": "double", "example": 0.04 }, "relativeEffectCIHigh": { "type": "number", "description": "Upper bound of the 95% credible interval for the relative effect (variant/control minus 1).", "format": "double", "example": 0.39 }, "evidence": { "$ref": "#/components/schemas/MetricEvidence" } }, "description": "Bayesian inference results for this variant metric.\nOmitted when Bayesian results aren\u0027t requested or no Bayesian result is available for this metric.\nIndividual inference fields can be omitted when their values aren\u0027t available.\n" }, "MetricResult": { "required": [ "name", "updatedAt", "value" ], "type": "object", "properties": { "name": { "type": "string", "description": "Metric name. Revenue per search results use \u0060revenue_per_search\u0060." }, "updatedAt": { "type": "string", "description": "Date and time when the metric was last updated, in RFC 3339 format." }, "value": { "type": "number", "description": "Metric value. For \u0060revenue_per_search\u0060, this is the winsorized mean revenue per search in the specified currency.", "format": "double" }, "valueCIHigh": { "type": "number", "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", "format": "double" }, "valueCILow": { "type": "number", "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", "format": "double" }, "pValue": { "type": "number", "description": "P-value for this variant compared to the control.\nOmitted when no p-value is available for this metric.\n", "format": "double" }, "dimension": { "type": "string", "description": "Dimension defined during test creation. For revenue metrics, including \u0060revenue_per_search\u0060 and \u0060winsorized_revenue_per_user\u0060, this is the currency." }, "metadata": { "$ref": "#/components/schemas/MetricMetadata" }, "criticalValue": { "type": "number", "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", "format": "double" }, "significant": { "type": "boolean", "description": "Whether the pValue is significant or not based on the critical value and the error correction algorithm used.\n" }, "bayesian": { "$ref": "#/components/schemas/BayesianMetricResult" } } }, "FilterEffects": { "type": "object", "properties": { "outliers": { "$ref": "#/components/schemas/FilterEffectsOutliers" }, "emptySearch": { "$ref": "#/components/schemas/FilterEffectsEmptySearch" } }, "description": "A/B test filter effects resulting from configuration settings." }, "VariantMetadata": { "type": "object", "properties": { "filterEffects": { "$ref": "#/components/schemas/FilterEffects" } }, "description": "Variant specific metadata." }, "Variant": { "required": [ "index", "description", "trafficPercentage", "metrics" ], "type": "object", "properties": { "description": { "type": "string", "description": "Description for this variant.", "example": "Current production index" }, "estimatedSampleSize": { "type": "integer", "description": "Estimated number of searches, or users for user-level rates (metrics ending in \u0060UsersRate\u0060), required to achieve the desired statistical significance.\n\nThe A/B test configuration must include a \u0060minimumDetectableEffect\u0060 setting for this number to be included in the response.\n", "example": 0 }, "index": { "type": "string", "description": "Index name of the A/B test variant (case-sensitive).", "example": "delcourt_production" }, "trafficPercentage": { "maximum": 99, "minimum": 1, "type": "integer", "description": "Percentage of search requests each variant receives.", "example": 60 }, "metrics": { "type": "array", "items": { "$ref": "#/components/schemas/MetricResult" }, "description": "All ABTest metrics that were defined during test creation." }, "metadata": { "$ref": "#/components/schemas/VariantMetadata" }, "customSearchParameters": { "$ref": "#/components/schemas/VariantCustomSearchParametersProperty" } }, "additionalProperties": false }, "EffectMetric": { "enum": [ "addToCartRate", "clickThroughRate", "conversionRate", "purchaseRate", "noResultsRate", "addToCartUsersRate", "clickedUsersRate", "convertedUsersRate", "purchaseUsersRate" ], "type": "string", "description": "Metric for which you want to detect the smallest relative difference.\nMetrics ending in \u0060UsersRate\u0060 are user-level rates: the share of tracked users with at least one search with a click, conversion, add-to-cart, or purchase.\nFor these metrics, sample sizes count users instead of searches.\n", "x-ms-enum": { "name": "EffectMetric", "modelAsString": false, "values": [ { "value": "addToCartRate", "name": "AddToCartRate" }, { "value": "clickThroughRate", "name": "ClickThroughRate" }, { "value": "conversionRate", "name": "ConversionRate" }, { "value": "purchaseRate", "name": "PurchaseRate" }, { "value": "noResultsRate", "name": "NoResultsRate" }, { "value": "addToCartUsersRate", "name": "AddToCartUsersRate" }, { "value": "clickedUsersRate", "name": "ClickedUsersRate" }, { "value": "convertedUsersRate", "name": "ConvertedUsersRate" }, { "value": "purchaseUsersRate", "name": "PurchaseUsersRate" } ] } }, "MinimumDetectableEffect": { "required": [ "size", "metric" ], "type": "object", "properties": { "size": { "maximum": 1, "minimum": 0, "type": "number", "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", "format": "double" }, "metric": { "$ref": "#/components/schemas/EffectMetric" } }, "description": "Configuration for the smallest difference between test variants you want to detect, used to estimate the required sample size." }, "MetricsFilterParameters": { "type": "object", "properties": { "filterAttribute": { "minLength": 1, "type": "string", "description": "Facet attribute of the category, for example \u0060categories.lvl0\u0060. Hierarchical facets have one attribute for each level.", "example": "categories.lvl0" }, "filterValue": { "minLength": 1, "type": "string", "description": "Facet value of the category, exactly as the search sends it.", "example": "Shoes" } }, "additionalProperties": false, "description": "Values for a filter that needs them.\nThe \u0060core.hasExactCategoryFilter\u0060 filter requires both properties and matches the searches that had the exact filter \u0060\u003CfilterAttribute\u003E:\u003CfilterValue\u003E\u0060.\nOptional filters and filters in an OR group don\u0027t match.\nWith \u0060includes\u0060 false or omitted, the test counts every search except those searches.\nA test can have at most one \u0060core.hasExactCategoryFilter\u0060 filter.\nOther filters don\u0027t accept parameters.\n" }, "MetricsFilter": { "required": [ "domain", "name" ], "type": "object", "properties": { "domain": { "type": "string", "description": "Metric domain (for example \u0060abtesting\u0060, \u0060core\u0060, \u0060personalization\u0060).", "example": "abtesting" }, "name": { "type": "string", "description": "Public metric name.", "example": "isOutlier" }, "trackEffects": { "type": "boolean", "description": "Whether the experiment should record the effects of this filter. Not supported by \u0060core.hasExactCategoryFilter\u0060." }, "includes": { "type": "boolean", "description": "If true, keep items that match the filter; if false, exclude them. Defaults to false." }, "parameters": { "$ref": "#/components/schemas/MetricsFilterParameters" } }, "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" }, "ErrorCorrectionType": { "enum": [ "bonferroni", "benjamini-hochberg" ], "type": "string", "description": "Multiple-testing correction method applied when evaluating metric significance.", "x-ms-enum": { "name": "ErrorCorrectionType", "modelAsString": false, "values": [ { "value": "bonferroni", "name": "Bonferroni" }, { "value": "benjamini-hochberg", "name": "BenjaminiHochberg" } ] } }, "PrimaryMetric": { "enum": [ "add_to_cart_rate", "click_through_rate", "conversion_rate", "purchase_rate", "revenue_per_search", "add_to_cart_users_rate", "clicked_users_rate", "converted_users_rate", "purchase_users_rate", "users_with_no_results_rate" ], "type": "string", "description": "Primary metric for Bayesian analysis. Required when \u0060method\u0060 is \u0060bayesian\u0060.\nWhen \u0060method\u0060 is omitted and the test defaults to \u0060bayesian\u0060, the default primary metric is \u0060conversion_rate\u0060,\nor the first metric in \u0060metrics\u0060 that supports Bayesian analysis if \u0060metrics\u0060 doesn\u0027t include conversion rate.\nIf the request includes a non-empty \u0060metrics\u0060 list, this metric must be in that list.\nUser-level rates (\u0060*_users_rate\u0060) are the share of tracked users with at least one such search.\nFor \u0060users_with_no_results_rate\u0060, this is the share of tracked users with at least one search returning no results. Lower values are better.\nAdd-to-cart rates, purchase rates, and revenue per search require access to revenue analytics.\n", "example": "conversion_rate", "x-ms-enum": { "name": "PrimaryMetric", "modelAsString": false, "values": [ { "value": "add_to_cart_rate", "name": "AddToCartRate" }, { "value": "click_through_rate", "name": "ClickThroughRate" }, { "value": "conversion_rate", "name": "ConversionRate" }, { "value": "purchase_rate", "name": "PurchaseRate" }, { "value": "revenue_per_search", "name": "RevenuePerSearch" }, { "value": "add_to_cart_users_rate", "name": "AddToCartUsersRate" }, { "value": "clicked_users_rate", "name": "ClickedUsersRate" }, { "value": "converted_users_rate", "name": "ConvertedUsersRate" }, { "value": "purchase_users_rate", "name": "PurchaseUsersRate" }, { "value": "users_with_no_results_rate", "name": "UsersWithNoResultsRate" } ] } }, "AbTestConfiguration": { "title": "configuration", "type": "object", "properties": { "minimumDetectableEffect": { "$ref": "#/components/schemas/MinimumDetectableEffect" }, "filters": { "type": "array", "items": { "$ref": "#/components/schemas/MetricsFilter" }, "description": "List of metric filters applied to the test population." }, "errorCorrection": { "$ref": "#/components/schemas/ErrorCorrectionType" }, "method": { "$ref": "#/components/schemas/AnalysisMethod" }, "primaryMetric": { "$ref": "#/components/schemas/PrimaryMetric" } }, "description": "A/B test configuration." }, "Decision": { "required": [ "winnerVariantId", "declaredAt" ], "type": "object", "properties": { "winnerVariantId": { "type": "integer", "description": "Identifier of the declared winning variant. The control variant is 1.", "example": 2 }, "declaredAt": { "type": "string", "description": "Date and time when the winning variant was declared, in RFC 3339 format.", "example": "2026-06-16T00:00:00Z" } }, "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" }, "AbTest": { "required": [ "status", "name", "hypothesis", "createdAt", "endAt", "updatedAt", "abTestID", "variants" ], "type": "object", "properties": { "abTestID": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 }, "updatedAt": { "type": "string", "description": "Date and time when the A/B test was last updated, in RFC 3339 format.", "example": "2023-06-15T15:06:44.400601Z" }, "createdAt": { "type": "string", "description": "Date and time when the A/B test was created, in RFC 3339 format.", "example": "2023-06-15T15:06:04.249906Z" }, "endAt": { "type": "string", "description": "End date and time of the A/B test, in RFC 3339 format.", "example": "2023-06-17T00:00:00Z" }, "stoppedAt": { "$ref": "#/components/schemas/StoppedAt" }, "name": { "type": "string", "description": "A/B test name.", "example": "Custom ranking sales rank test" }, "hypothesis": { "type": "string", "description": "Expected outcome of the A/B test.", "example": "Enabling the feature increases conversion rate" }, "status": { "$ref": "#/components/schemas/Status" }, "variants": { "type": "array", "items": { "$ref": "#/components/schemas/Variant" }, "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" }, "configuration": { "$ref": "#/components/schemas/AbTestConfiguration" }, "decision": { "$ref": "#/components/schemas/Decision" } }, "additionalProperties": false }, "AbTests": { "type": "array", "items": { "$ref": "#/components/schemas/AbTest" }, "description": "A/B tests.", "nullable": true }, "AbTestsVariant": { "required": [ "index", "trafficPercentage" ], "type": "object", "properties": { "index": { "type": "string", "description": "Index name of the A/B test variant (case-sensitive).", "example": "delcourt_production" }, "trafficPercentage": { "maximum": 99, "minimum": 1, "type": "integer", "description": "Percentage of search requests each variant receives.", "example": 60 }, "description": { "type": "string", "description": "Description for this variant.", "example": "Current production index" } }, "additionalProperties": false }, "CustomSearchParams": { "required": [ "customSearchParameters" ], "type": "object", "properties": { "customSearchParameters": { "$ref": "#/components/schemas/CustomSearchParamsCustomSearchParametersProperty" } }, "additionalProperties": false, "description": "Search parameters to add to the test variant.\nOnly use this parameter if the two variants use the same index.\n", "example": { "typoTolerance": false, "synonyms": false }, "x-discriminator-fields": [ "customSearchParameters" ] }, "AbTestsVariantSearchParams": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/AbTestsVariant" }, { "$ref": "#/components/schemas/CustomSearchParams" } ] }, "AddAbTestsVariant": { "oneOf": [ { "$ref": "#/components/schemas/AbTestsVariant" }, { "$ref": "#/components/schemas/AbTestsVariantSearchParams" } ] }, "CreateMetric": { "required": [ "name" ], "type": "object", "properties": { "name": { "type": "string", "description": "Name of the metric." }, "dimension": { "type": "string", "description": "Dimension of the metric, for example, in case of a revenue metric it could be USD, EUR..." } }, "description": "Defines a metric to be retrieved during an A/B test." }, "AbTestResponse": { "required": [ "abTestID", "index", "taskID" ], "type": "object", "properties": { "index": { "type": "string", "description": "Index name of the A/B test variant (case-sensitive).", "example": "delcourt_production" }, "abTestID": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 }, "taskID": { "type": "integer", "description": "Unique identifier of a task.\n\nA successful API response means that a task was added to a queue.\nIt might not run immediately.\nYou can check the task\u0027s progress with the [\u0060task\u0060 operation](https://www.algolia.com/doc/rest-api/search/get-task) and this task ID.\n", "format": "int64", "example": 1514562690001 } }, "additionalProperties": false }, "EstimateAbTestResponse": { "type": "object", "properties": { "durationDays": { "type": "integer", "description": "Estimated number of days needed to reach the sample sizes required for detecting the configured effect. This value is based on historical traffic.", "format": "int64", "example": 21 }, "sampleSizes": { "type": "array", "items": { "type": "integer", "description": "Number of tracked searches, or tracked users for user-level rates, needed to be able to detect the configured effect for the control variant.", "format": "int64", "example": 23415 }, "description": "Sample size estimates for each variant. The first element is the control variant.\nEach element is the estimated number of searches, or users for user-level rates (metrics ending in \u0060UsersRate\u0060), required to achieve the desired statistical significance.\n" } } }, "MetricName": { "enum": [ "search_count", "tracked_search_count", "user_count", "tracked_user_count", "no_result_count", "tracked_no_result_count", "add_to_cart_count", "purchase_count", "clicked_search_count", "converted_search_count", "click_through_rate", "conversion_rate", "add_to_cart_rate", "purchase_rate", "average_click_position", "revenue", "revenue_per_search", "average_order_value", "clicked_users_count", "converted_users_count", "add_to_cart_users_count", "purchase_users_count", "users_with_no_results_count", "clicked_users_rate", "converted_users_rate", "add_to_cart_users_rate", "purchase_users_rate", "users_with_no_results_rate", "avg_click_through_rate_per_user", "avg_conversion_rate_per_user", "avg_purchase_rate_per_user", "avg_add_to_cart_rate_per_user", "avg_click_position_per_user", "winsorized_revenue_per_user", "winsorized_revenue_per_purchaser" ], "type": "string", "x-ms-enum": { "name": "MetricName", "modelAsString": false, "values": [ { "value": "search_count", "name": "SearchCount" }, { "value": "tracked_search_count", "name": "TrackedSearchCount" }, { "value": "user_count", "name": "UserCount" }, { "value": "tracked_user_count", "name": "TrackedUserCount" }, { "value": "no_result_count", "name": "NoResultCount" }, { "value": "tracked_no_result_count", "name": "TrackedNoResultCount" }, { "value": "add_to_cart_count", "name": "AddToCartCount" }, { "value": "purchase_count", "name": "PurchaseCount" }, { "value": "clicked_search_count", "name": "ClickedSearchCount" }, { "value": "converted_search_count", "name": "ConvertedSearchCount" }, { "value": "click_through_rate", "name": "ClickThroughRate" }, { "value": "conversion_rate", "name": "ConversionRate" }, { "value": "add_to_cart_rate", "name": "AddToCartRate" }, { "value": "purchase_rate", "name": "PurchaseRate" }, { "value": "average_click_position", "name": "AverageClickPosition" }, { "value": "revenue", "name": "Revenue" }, { "value": "revenue_per_search", "name": "RevenuePerSearch" }, { "value": "average_order_value", "name": "AverageOrderValue" }, { "value": "clicked_users_count", "name": "ClickedUsersCount" }, { "value": "converted_users_count", "name": "ConvertedUsersCount" }, { "value": "add_to_cart_users_count", "name": "AddToCartUsersCount" }, { "value": "purchase_users_count", "name": "PurchaseUsersCount" }, { "value": "users_with_no_results_count", "name": "UsersWithNoResultsCount" }, { "value": "clicked_users_rate", "name": "ClickedUsersRate" }, { "value": "converted_users_rate", "name": "ConvertedUsersRate" }, { "value": "add_to_cart_users_rate", "name": "AddToCartUsersRate" }, { "value": "purchase_users_rate", "name": "PurchaseUsersRate" }, { "value": "users_with_no_results_rate", "name": "UsersWithNoResultsRate" }, { "value": "avg_click_through_rate_per_user", "name": "AvgClickThroughRatePerUser" }, { "value": "avg_conversion_rate_per_user", "name": "AvgConversionRatePerUser" }, { "value": "avg_purchase_rate_per_user", "name": "AvgPurchaseRatePerUser" }, { "value": "avg_add_to_cart_rate_per_user", "name": "AvgAddToCartRatePerUser" }, { "value": "avg_click_position_per_user", "name": "AvgClickPositionPerUser" }, { "value": "winsorized_revenue_per_user", "name": "WinsorizedRevenuePerUser" }, { "value": "winsorized_revenue_per_purchaser", "name": "WinsorizedRevenuePerPurchaser" } ] } }, "MetricDate": { "type": "object", "properties": { "date": { "type": "string", "description": "Date where the metric was updated, in RFC 3339 format.", "example": "2025-06-15" }, "metrics": { "type": "array", "items": { "$ref": "#/components/schemas/MetricResult" }, "description": "All ABTest metrics that were defined during test creation." } } }, "TimeseriesVariant": { "type": "object", "properties": { "dates": { "type": "array", "items": { "$ref": "#/components/schemas/MetricDate" } } } }, "Timeseries": { "required": [ "abTestID", "variants" ], "type": "object", "properties": { "abTestID": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 }, "variants": { "type": "array", "items": { "$ref": "#/components/schemas/TimeseriesVariant" }, "description": "A/B test timeseries 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" } }, "additionalProperties": false }, "FeatureSettings": { "required": [ "name", "settings" ], "type": "object", "properties": { "name": { "type": "string", "description": "Name of the feature the settings belong to.", "example": "drr" }, "settings": { "description": "Feature settings payload. The shape depends on the feature." } }, "additionalProperties": false, "description": "Feature-specific settings captured for a variant." }, "VariantSettings": { "required": [ "variantId", "applied" ], "type": "object", "properties": { "variantId": { "type": "integer", "description": "One-based index of the variant within the A/B test. The control is variant 1.", "example": 2 }, "applied": { "type": "boolean", "description": "Whether the variant\u0027s settings have been applied to the control index." }, "featuresSettings": { "type": "array", "items": { "$ref": "#/components/schemas/FeatureSettings" }, "description": "Feature-specific settings captured for the variant." }, "indexSettings": { "$ref": "#/components/schemas/VariantSettingsIndexSettingsProperty" }, "applyTimestamp": { "type": "string", "description": "Date and time when the variant\u0027s settings were applied to the control index, in RFC 3339 format.", "example": "2023-06-17T00:00:00Z" }, "revertTimestamp": { "type": "string", "description": "Date and time when the applied settings were reverted on the control index, in RFC 3339 format.", "example": "2023-06-18T00:00:00Z" }, "declaredTimestamp": { "type": "string", "description": "Date and time when the variant\u0027s settings were captured, in RFC 3339 format.", "example": "2023-06-16T00:00:00Z" }, "expiredTimestamp": { "type": "string", "description": "Date and time when the captured settings expired, in RFC 3339 format.", "example": "2023-07-16T00:00:00Z" } }, "additionalProperties": false, "description": "Settings captured for one A/B test variant." }, "AbTestSettingsResponse": { "required": [ "abtestSettings", "controlIndexInUse" ], "type": "object", "properties": { "abtestSettings": { "type": "array", "items": { "$ref": "#/components/schemas/VariantSettings" }, "description": "Captured settings for each variant of the A/B test." }, "controlIndexInUse": { "type": "boolean", "description": "Whether another active A/B test is using the control index." } }, "additionalProperties": false, "description": "Captured settings of an A/B test." }, "SaveSettingsRequest": { "type": "object", "properties": { "saveFeaturesSettings": { "type": "boolean", "description": "Whether to also capture the variant\u0027s index settings and feature-specific settings. This must be true for A/B tests whose variants use different indices so that the captured variant settings can later be applied.", "default": false } }, "additionalProperties": false, "description": "Options for capturing a variant\u0027s settings." }, "ConflictResponse": { "title": "conflictResponse", "required": [ "status", "message" ], "type": "object", "properties": { "status": { "type": "integer", "description": "Status code.", "example": 409 }, "message": { "type": "string", "description": "Response message.", "example": "Conflict" } }, "additionalProperties": false }, "FilterEffectsOutliers": { "title": "outliersFilter", "type": "object", "properties": { "usersCount": { "type": "integer", "description": "Number of users removed from the A/B test.", "example": 1 }, "trackedSearchesCount": { "type": "integer", "description": "Number of tracked searches removed from the A/B test.", "example": 237 } }, "description": "Outliers removed from the A/B test as a result of configuration settings.", "example": { "usersCount": 1, "trackedSearchesCount": 237 } }, "FilterEffectsEmptySearch": { "title": "emptySearchFilter", "type": "object", "properties": { "usersCount": { "type": "integer", "description": "Number of users removed from the A/B test.", "example": 1 }, "trackedSearchesCount": { "type": "integer", "description": "Number of tracked searches removed from the A/B test.", "example": 237 } }, "description": "Empty searches removed from the A/B test as a result of configuration settings.", "example": { "usersCount": 1, "trackedSearchesCount": 237 } }, "AddAbTestsRequest": { "title": "addABTestsRequest", "required": [ "name", "variants", "metrics", "endAt" ], "type": "object", "properties": { "name": { "type": "string", "description": "A/B test name.", "example": "Custom ranking sales rank test" }, "hypothesis": { "type": "string", "description": "Expected outcome of the A/B test.", "example": "Enabling the feature increases conversion rate" }, "variants": { "minItems": 2, "type": "array", "items": { "$ref": "#/components/schemas/AddAbTestsVariant" }, "description": "A/B test variants." }, "metrics": { "type": "array", "items": { "$ref": "#/components/schemas/CreateMetric" }, "description": "A/B test metrics involved in the test. Only these metrics will be considered when calculating results." }, "configuration": { "$ref": "#/components/schemas/AbTestConfiguration" }, "endAt": { "type": "string", "description": "End date and time of the A/B test, in RFC 3339 format.", "example": "2023-06-17T00:00:00Z" } }, "additionalProperties": false }, "EstimateAbTestRequest": { "title": "estimateABTestRequest", "required": [ "configuration", "variants" ], "type": "object", "properties": { "configuration": { "$ref": "#/components/schemas/EstimateAbTestRequestConfiguration" }, "variants": { "minItems": 2, "type": "array", "items": { "$ref": "#/components/schemas/AddAbTestsVariant" }, "description": "A/B test variants." } }, "additionalProperties": false }, "CustomGet200ResponseSchema": { "type": "object" }, "CustomPostRequestRequestBody": { "type": "object" }, "CustomPost200ResponseSchema": { "type": "object" }, "CustomPutRequestRequestBody": { "type": "object" }, "CustomPut200ResponseSchema": { "type": "object" }, "CustomDelete200ResponseSchema": { "type": "object" }, "ListAbTestsResponse": { "title": "listABTestsResponse", "required": [ "abtests", "count", "total" ], "type": "object", "properties": { "abtests": { "$ref": "#/components/schemas/AbTests" }, "count": { "type": "integer", "description": "Number of A/B tests.", "example": 10 }, "total": { "type": "integer", "description": "Number of retrievable A/B tests.", "example": 12 } }, "additionalProperties": false }, "VariantCustomSearchParametersProperty": { "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", "example": { "enablePersonalization": true, "personalizationImpact": 50 } }, "CustomSearchParamsCustomSearchParametersProperty": { "type": "object" }, "VariantSettingsIndexSettingsProperty": { "type": "object", "description": "Index settings captured for the variant." }, "EstimateAbTestRequestConfiguration": { "title": "estimateConfiguration", "required": [ "minimumDetectableEffect" ], "type": "object", "properties": { "filters": { "type": "array", "items": { "$ref": "#/components/schemas/MetricsFilter" }, "description": "List of metric filters applied to the test population." }, "minimumDetectableEffect": { "$ref": "#/components/schemas/MinimumDetectableEffect" } }, "description": "A/B test configuration for estimating the sample size and duration using minimum detectable effect." } }, "responses": { "BadRequest": { "description": "Bad request or request arguments.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBase" } } } }, "FeatureNotEnabled": { "description": "This feature is not enabled on your Algolia account.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBase" } } } }, "MethodNotAllowed": { "description": "Method not allowed with this API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBase" } } } }, "IndexNotFound": { "description": "Index not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBase" } } } }, "UnprocessableEntity": { "description": "Unprocessable Entity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBase" } } } }, "Conflict": { "description": "Conflict.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConflictResponse" } } } } }, "parameters": { "PathInPath": { "name": "path", "in": "path", "description": "Path of the endpoint, for example \u00601/newFeature\u0060.", "required": true, "schema": { "type": "string", "example": "/keys" } }, "Parameters": { "name": "parameters", "in": "query", "description": "Query parameters to apply to the current query.", "schema": { "type": "object" } }, "Methods": { "name": "methods", "in": "query", "description": "Statistical analysis results to include, as a comma-separated list.\nWhen omitted, each test uses its configured method, or \u0060frequentist\u0060 if no method is configured.\nRequest both methods to include both sets of available results. This doesn\u0027t change the test configuration or compute missing results.\nDuplicate values aren\u0027t allowed.\n", "explode": false, "schema": { "minItems": 1, "type": "array", "items": { "$ref": "#/components/schemas/AnalysisMethod" } } }, "ID": { "name": "id", "in": "path", "description": "Unique A/B test identifier.", "required": true, "schema": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 } }, "StartDate": { "name": "startDate", "in": "query", "description": "Start date of the period to analyze, in \u0060YYYY-MM-DD\u0060 format.", "schema": { "type": "string", "example": "2022-09-19" } }, "EndDate": { "name": "endDate", "in": "query", "description": "End date of the period to analyze, in \u0060YYYY-MM-DD\u0060 format.", "schema": { "type": "string", "example": "2023-01-21" } }, "VariantID": { "name": "variantId", "in": "path", "description": "One-based index of the A/B test variant. The control is variant 1.", "required": true, "schema": { "minimum": 1, "type": "integer", "example": 2 } } }, "headers": { "x-ratelimit-limit": { "description": "Number of allowed requests per one minute.", "schema": { "type": "integer" }, "example": 100 }, "x-ratelimit-remaining": { "description": "Number of remaining requests in the current period.", "schema": { "type": "integer" }, "example": 99 }, "x-ratelimit-reset": { "description": "Timestamp when the rate limit will reset, measured in seconds since the Unix epoch.", "schema": { "type": "integer" }, "example": 1710682486 } }, "securitySchemes": { "appId": { "type": "apiKey", "description": "Your Algolia application ID.", "name": "x-algolia-application-id", "in": "header" }, "apiKey": { "type": "apiKey", "description": "Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint\u0027s reference.\n", "name": "x-algolia-api-key", "in": "header" } } }, "security": [ { "appId": [], "apiKey": [] } ], "tags": [ { "name": "abtest", "description": "Manage A/B tests.\n\nA/B tests are configurations one or more indices, usually your production index and an index with different settings that you want to test.\n", "x-displayName": "A/B testing" } ], "externalDocs": { "description": "A/B testing.", "url": "https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing" }, "x-tagGroups": [ { "name": "General", "tags": [ "abtest" ] } ], "x-client-original-servers": [ { "url": "https://analytics.{region}.algolia.com", "variables": { "region": { "default": "us", "enum": [ "us", "de" ] } } }, { "url": "https://analytics.algolia.com" } ], "x-client-unused-schemas": { "AbTestId": { "type": "integer", "description": "Unique A/B test identifier.", "example": 224 }, "UpdatedAt": { "type": "string", "description": "Date and time when the A/B test was last updated, in RFC 3339 format.", "example": "2023-06-15T15:06:44.400601Z" }, "CreatedAt": { "type": "string", "description": "Date and time when the A/B test was created, in RFC 3339 format.", "example": "2023-06-15T15:06:04.249906Z" }, "EndAt": { "type": "string", "description": "End date and time of the A/B test, in RFC 3339 format.", "example": "2023-06-17T00:00:00Z" }, "Name": { "type": "string", "description": "A/B test name.", "example": "Custom ranking sales rank test" }, "Hypothesis": { "type": "string", "description": "Expected outcome of the A/B test.", "example": "Enabling the feature increases conversion rate" }, "Description": { "type": "string", "description": "Description for this variant.", "example": "Current production index" }, "Index": { "type": "string", "description": "Index name of the A/B test variant (case-sensitive).", "example": "delcourt_production" }, "TrafficPercentage": { "maximum": 99, "minimum": 1, "type": "integer", "description": "Percentage of search requests each variant receives.", "example": 60 }, "Metrics": { "type": "array", "items": { "$ref": "#/components/schemas/MetricResult" }, "description": "All ABTest metrics that were defined during test creation." }, "Variants": { "type": "array", "items": { "$ref": "#/components/schemas/Variant" }, "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" }, "MetricsFilters": { "type": "array", "items": { "$ref": "#/components/schemas/MetricsFilter" }, "description": "List of metric filters applied to the test population." }, "TaskId": { "type": "integer", "description": "Unique identifier of a task.\n\nA successful API response means that a task was added to a queue.\nIt might not run immediately.\nYou can check the task\u0027s progress with the [\u0060task\u0060 operation](https://www.algolia.com/doc/rest-api/search/get-task) and this task ID.\n", "format": "int64", "example": 1514562690001 }, "MetricDates": { "type": "array", "items": { "$ref": "#/components/schemas/MetricDate" } }, "TimeseriesVariants": { "type": "array", "items": { "$ref": "#/components/schemas/TimeseriesVariant" }, "description": "A/B test timeseries 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" }, "VariantCustomSearchParameters": { "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", "example": { "enablePersonalization": true, "personalizationImpact": 50 } }, "CustomSearchParamsCustomSearchParameters": { "type": "object" }, "VariantSettingsIndexSettings": { "type": "object", "description": "Index settings captured for the variant." }, "CustomGet200Response": { "type": "object" }, "CustomPostRequest": { "type": "object" }, "CustomPost200Response": { "type": "object" }, "CustomPutRequest": { "type": "object" }, "CustomPut200Response": { "type": "object" }, "CustomDelete200Response": { "type": "object" }, "ExamplePayload": { "type": "object", "description": "Placeholder schema for path example refs" } } }