Skip to main content
This page documents an earlier version of the API client. For the latest version, see List all A/B tests.
Required ACL: analytics

Examples

AnalyticsClient analytics = new AnalyticsClient("YourApplicationID", "YourWriteAPIKey");

var abTests = analytics.GetABTests(10, 20);

// Asynchronous
var abTests = await analytics.GetABTestsAsync(10, 20);

Parameters

indexPrefix
string
Prefix of index names. Returns A/B test variants whose index names start with this prefix.
indexSuffix
string
Suffix of index names. Returns A/B test variants whose index names end with this suffix.
limit
integer
default:10
Number of A/B tests to retrieve.
offset
integer
default:0
Position of the first A/B test to retrieve.

Response

abtests
object[]
List of A/B test objects.
count
integer
Number of returned A/B tests.
total
integer
Total number of A/B tests that can be fetched.

Response as JSON

This section shows the JSON response returned by the API. Each API client wraps this response in language-specific objects, so the structure may vary. To view the response, use the getLogs method. Don’t rely on the order of properties—JSON objects don’t preserve key order.
JSON
{
  "count": 1,
  "total": 1,
  "abtests": [
    {
      "abtestID": 102,
      "name": "ABTest custom name",
      "createdAt": "2018-06-04T10:25:40.459519Z",
      "endAt": "2018-06-11T23:59:59Z",
      "status": "active",
      "configuration": {
        "outliers": {
          "exclude": true
        },
        "emptySearch": {
          "exclude": false
        },
      },
      "variants": [
        {
          "averageClickPosition": null,
          "clickCount": null,
          "clickThroughRate": null,
          "conversionCount": null,
          "conversionRate": null,
          "description": "my current scenario description",
          "index": "scout_airports",
          "noResultCount": null,
          "searchCount": null,
          "trackedSearchCount": null,
          "trafficPercentage": 61,
          "userCount": null,
          "trackedUserCount": null,
          "filterEffects": {
            "outliers": {
              "usersCount": 0,
              "trackedSearchesCount": 0
            }
          }
        },
        {
          "averageClickPosition": null,
          "clickCount": null,
          "clickThroughRate": null,
          "conversionCount": null,
          "conversionRate": null,
          "description": "the test scenarios is based on locations",
          "index": "airport_demo_airports",
          "noResultCount": null,
          "searchCount": null,
          "trackedSearchCount": null,
          "trafficPercentage": 39,
          "userCount": null,
          "trackedUserCount": null,
          "filterEffects": {
            "outliers": {
              "usersCount": 1,
              "trackedSearchesCount": 300
            }
          }
        }
      ],
      "clickSignificance": null,
      "conversionSignificance": null
    }
  ]
}
I