A/B Testing API (0.1.0)
API powering the A/B Testing feature of Algolia.
Send requests to the Algolia REST API.
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
parameters | string Example: parameters=?query=mySearchQuery&hitsPerPage=10 URL-encoded query string. Force some query parameters to be applied for each query made with this API key. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Send requests to the Algolia REST API.
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
parameters | string Example: parameters=?query=mySearchQuery&hitsPerPage=10 URL-encoded query string. Force some query parameters to be applied for each query made with this API key. |
Request Body schema: application/json
The parameters to send with the custom request.
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Send requests to the Algolia REST API.
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
parameters | string Example: parameters=?query=mySearchQuery&hitsPerPage=10 URL-encoded query string. Force some query parameters to be applied for each query made with this API key. |
Request Body schema: application/json
The parameters to send with the custom request.
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Send requests to the Algolia REST API.
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
parameters | string Example: parameters=?query=mySearchQuery&hitsPerPage=10 URL-encoded query string. Force some query parameters to be applied for each query made with this API key. |
Request Body schema: application/json
The parameters to send with the custom request.
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Creates a new A/B test with provided configuration.
Creates a new A/B test with provided configuration. You can set an A/B test on two different indices with different settings, or on the same index with different search parameters by providing a customSearchParameters setting on one of the variants.
Request Body schema: application/json
name required | string (name) A/B test name. |
required | Array of abTestsVariant (object) or abTestsVariantSearchParams (object) (AddABTestsVariant) 2 items [ items ] List of 2 variants for the A/B test. |
endAt required | string (endAt) End date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ. |
Responses
Request samples
- Payload
{- "name": "string",
- "variant": [
- {
- "index": "string",
- "trafficPercentage": 0,
- "description": "string"
}, - {
- "index": "string",
- "trafficPercentage": 0,
- "description": "string"
}
], - "endAt": "string"
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "index": "string",
- "abTestID": 0,
- "taskID": 0
}
Fetch all existing A/B tests for App that are available for the current API Key.
Fetch all existing A/B tests for App that are available for the current API Key. Returns an array of metadata and metrics. When no data has been processed, the metrics will be returned as null.
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. Limit is the size of the page. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "abtests": [
- {
- "abTestID": 0,
- "clickSignificance": 0,
- "conversionSignificance": 0,
- "endAt": "string",
- "createdAt": "string",
- "name": "string",
- "status": "string",
- "variants": [
- {
- "averageClickPosition": 0,
- "clickCount": 0,
- "clickThroughRate": 0,
- "conversionCount": 0,
- "conversionRate": 0,
- "description": "string",
- "index": "string",
- "noResultCount": 0,
- "searchCount": 0,
- "trackedSearchCount": 0,
- "trafficPercentage": 0,
- "userCount": 0
}
]
}
], - "count": 0,
- "total": 0
}
Returns metadata and metrics for A/B test id.
Returns metadata and metrics for A/B test id. Behaves in the same way as GET /2/abtests however the endpoint will return 403.
path Parameters
id required | integer The A/B test ID. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "abTestID": 0,
- "clickSignificance": 0,
- "conversionSignificance": 0,
- "endAt": "string",
- "createdAt": "string",
- "name": "string",
- "status": "string",
- "variants": [
- {
- "averageClickPosition": 0,
- "clickCount": 0,
- "clickThroughRate": 0,
- "conversionCount": 0,
- "conversionRate": 0,
- "description": "string",
- "index": "string",
- "noResultCount": 0,
- "searchCount": 0,
- "trackedSearchCount": 0,
- "trafficPercentage": 0,
- "userCount": 0
}
]
}
Marks the A/B test as stopped.
Marks the A/B test as stopped. At this point, the test is over and cannot be restarted. As a result, your application is back to normal: index A will perform as usual, receiving 100% of all search requests. Associated metadata and metrics are still stored.
path Parameters
id required | integer The A/B test ID. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "index": "string",
- "abTestID": 0,
- "taskID": 0
}