The generated API clients are a work in progress, you can also find our stable clients on the Algolia documentation.

Skip to main content

A/B Testing API (1.0.0)

Download OpenAPI specification:Download

API powering the A/B Testing feature of Algolia.

A/B testing

Manage A/B tests.

Create an A/B test

Creates an A/B test.

Authorizations:
(appIdapiKey)
Request Body schema: application/json
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

Content type
application/json
{
  • "name": "Custom ranking sales rank test",
  • "variants": [
    ],
  • "endAt": "2023-06-17T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "index": "delcourt_production",
  • "abTestID": 224,
  • "taskID": 1514562690001
}

List all A/B tests

List all A/B tests.

Authorizations:
(appIdapiKey)
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

Content type
application/json
{
  • "abtests": [
    ],
  • "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:
(appIdapiKey)
path Parameters
id
required
integer
Example: 390

Unique A/B test ID.

Responses

Response samples

Content type
application/json
{
  • "abTestID": 224,
  • "clickSignificance": 1,
  • "conversionSignificance": "2023-06-17T00:00:00Z",
  • "updatedAt": "2023-06-15T15:06:44.400601Z",
  • "createdAt": "2023-06-15T15:06:04.249906Z",
  • "name": "Custom ranking sales rank test",
  • "status": "running",
  • "variants": [
    ]
}

Delete an A/B test

Delete an A/B test. To determine the id for an A/B test, use the listABTests operation.

Authorizations:
(appIdapiKey)
path Parameters
id
required
integer
Example: 390

Unique A/B test ID.

Responses

Response samples

Content type
application/json
{
  • "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:
(appIdapiKey)
path Parameters
id
required
integer
Example: 390

Unique A/B test ID.

Responses

Response samples

Content type
application/json
{
  • "index": "delcourt_production",
  • "abTestID": 224,
  • "taskID": 1514562690001
}