Skip to main content

A/B Testing API (0.1.0)

API powering the A/B Testing feature of Algolia.

Authentication

appId

Security Scheme Type API Key
Header parameter name: X-Algolia-Application-Id

apiKey

Security Scheme Type API Key
Header parameter name: X-Algolia-API-Key

abtesting

abtesting API reference

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
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

Content type
application/json
{ }

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
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.

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
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.

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
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.

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

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.

Authorizations:
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

Content type
application/json
{
  • "name": "string",
  • "variant": [
    ],
  • "endAt": "string"
}

Response samples

Content type
application/json
{
  • "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.

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. Limit is the size of the page.

Responses

Response samples

Content type
application/json
{
  • "abtests": [
    ],
  • "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.

Authorizations:
path Parameters
id
required
integer

The A/B test ID.

Responses

Response samples

Content type
application/json
{
  • "abTestID": 0,
  • "clickSignificance": 0,
  • "conversionSignificance": 0,
  • "endAt": "string",
  • "createdAt": "string",
  • "name": "string",
  • "status": "string",
  • "variants": [
    ]
}

Deletes the A/B Test.

Deletes the A/B Test and removes all associated metadata & metrics.

Authorizations:
path Parameters
id
required
integer

The A/B test ID.

Responses

Response samples

Content type
application/json
{
  • "index": "string",
  • "abTestID": 0,
  • "taskID": 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.

Authorizations:
path Parameters
id
required
integer

The A/B test ID.

Responses

Response samples

Content type
application/json
{
  • "index": "string",
  • "abTestID": 0,
  • "taskID": 0
}