A/B Testing API (1.0.0)
Download OpenAPI specification:Download
API powering the A/B Testing feature of Algolia.
Create an A/B test.
Creates an A/B test.
Authorizations:
Request Body schema: application/jsonrequired
name required | string (name) A/B test name. |
required | Array of abTestsVariant (object) or abTestsVariantSearchParams (object) (AddABTestsVariant) = 2 items A/B test variants. |
endAt required | string (endAt) End date timestamp in ISO-8601 format. |
Responses
Request samples
- Payload
{- "name": "Custom ranking sales rank test",
- "variants": [
- {
- "index": "delcourt_production",
- "trafficPercentage": 60,
- "description": "Current production index"
}, - {
- "index": "delcourt_production",
- "trafficPercentage": 60,
- "description": "Current production index"
}
], - "endAt": "2023-06-17T00:00:00Z"
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "index": "delcourt_production",
- "abTestID": 224,
- "taskID": 1514562690001
}
List all A/B tests.
List all A/B tests.
Authorizations:
query Parameters
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
limit | integer Default: 10 Number of records to return (page size). |
indexPrefix | string Example: indexPrefix=dev_ Only return A/B tests for indices starting with this prefix. |
indexSuffix | string Example: indexSuffix=_development Only return A/B tests for indices ending with this suffix. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "abtests": [
- {
- "abTestID": 224,
- "clickSignificance": 1,
- "conversionSignificance": 1,
- "addToCartSignificance": 1,
- "purchaseSignificance": 1,
- "revenueSignificance": {
- "USD": 1,
- "EUR": 0.87
}, - "updatedAt": "2023-06-15T15:06:44.400601Z",
- "createdAt": "2023-06-15T15:06:04.249906Z",
- "endAt": "2023-06-17T00:00:00Z",
- "name": "Custom ranking sales rank test",
- "status": "running",
- "variants": [
- {
- "addToCartCount": 0,
- "addToCartRate": 0,
- "averageClickPosition": 0,
- "clickCount": 65131,
- "clickThroughRate": 0.22219857724813036,
- "conversionCount": 4785,
- "conversionRate": 0.14546725846658964,
- "currencies": {
- "USD": {
- "currency": "USD",
- "revenue": 120,
- "mean": 53.7,
- "standardDeviation": 12.3
}, - "EUR": {
- "currency": "EUR",
- "revenue": 100,
- "mean": 43.7,
- "standardDeviation": 10.3
}
}, - "description": "Current production index",
- "filterEffects": {
- "outliers": {
- "usersCount": 1,
- "trackedSearchesCount": 237
}, - "emptySearch": {
- "usersCount": 1,
- "trackedSearchesCount": 237
}
}, - "index": "delcourt_production",
- "noResultCount": 0,
- "purchaseCount": 0,
- "purchaseRate": 0,
- "searchCount": 86269,
- "trackedSearchCount": 2,
- "trafficPercentage": 60,
- "userCount": 55501,
- "trackedUserCount": 55501
}
]
}
], - "count": 10,
- "total": 12
}
Get A/B test details.
Get specific details for an A/B test.
To determine the id
for an A/B test, use the listABTests
operation.
Authorizations:
path Parameters
id required | integer Example: 390 Unique A/B test ID. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "abTestID": 224,
- "clickSignificance": 1,
- "conversionSignificance": 1,
- "addToCartSignificance": 1,
- "purchaseSignificance": 1,
- "revenueSignificance": {
- "USD": 1,
- "EUR": 0.87
}, - "updatedAt": "2023-06-15T15:06:44.400601Z",
- "createdAt": "2023-06-15T15:06:04.249906Z",
- "endAt": "2023-06-17T00:00:00Z",
- "name": "Custom ranking sales rank test",
- "status": "running",
- "variants": [
- {
- "addToCartCount": 0,
- "addToCartRate": 0,
- "averageClickPosition": 0,
- "clickCount": 65131,
- "clickThroughRate": 0.22219857724813036,
- "conversionCount": 4785,
- "conversionRate": 0.14546725846658964,
- "currencies": {
- "USD": {
- "currency": "USD",
- "revenue": 120,
- "mean": 53.7,
- "standardDeviation": 12.3
}, - "EUR": {
- "currency": "EUR",
- "revenue": 100,
- "mean": 43.7,
- "standardDeviation": 10.3
}
}, - "description": "Current production index",
- "filterEffects": {
- "outliers": {
- "usersCount": 1,
- "trackedSearchesCount": 237
}, - "emptySearch": {
- "usersCount": 1,
- "trackedSearchesCount": 237
}
}, - "index": "delcourt_production",
- "noResultCount": 0,
- "purchaseCount": 0,
- "purchaseRate": 0,
- "searchCount": 86269,
- "trackedSearchCount": 2,
- "trafficPercentage": 60,
- "userCount": 55501,
- "trackedUserCount": 55501
}
]
}
Delete an A/B test.
Delete an A/B test.
To determine the id
for an A/B test, use the listABTests
operation.
Authorizations:
path Parameters
id required | integer Example: 390 Unique A/B test ID. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "index": "delcourt_production",
- "abTestID": 224,
- "taskID": 1514562690001
}
Stop an A/B test.
If stopped, the test is over and can't be restarted. There is now only one index, receiving 100% of all search requests.
The data gathered for stopped A/B tests is retained.
To determine the id
for an A/B test, use the listABTests
operation.
Authorizations:
path Parameters
id required | integer Example: 390 Unique A/B test ID. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "index": "delcourt_production",
- "abTestID": 224,
- "taskID": 1514562690001
}