Skip to main content

List All Experiments

Enterprise

This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.

Endpoint

/o?method=ab-testing

Overview

List AB testing experiments for an app. For running experiments, this endpoint recalculates performance metrics unless skipCalculation=true.

Authentication

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions

  • Read (ab_testing feature)

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or use auth_token)API key for authentication
auth_tokenStringYes (or use api_key)Auth token for authentication
app_idStringYesApplication ID
skipCalculationStringNoSet to true to skip live performance recalculation

Examples

Example 1: List experiments with recalculation

Request:

curl "https://your-server.com/o?method=ab-testing&app_id=YOUR_APP_ID&api_key=YOUR_API_KEY"

Response:

{
"experiments": [],
"performance_metrics": [
{"value": "improvement"},
{"value": "conversion_rate"},
{"value": "probability_beat_baseline"},
{"value": "conversion_number"}
]
}

Example 2: List experiments without recalculation

Request:

curl "https://your-server.com/o?method=ab-testing&app_id=YOUR_APP_ID&skipCalculation=true&api_key=YOUR_API_KEY"

Response:

{
"experiments": [],
"performance_metrics": [
{"value": "improvement"},
{"value": "conversion_rate"},
{"value": "probability_beat_baseline"},
{"value": "conversion_number"}
]
}

Response

Success Response

{
"experiments": [],
"performance_metrics": [
{
"value": "improvement"
},
{
"value": "conversion_rate"
},
{
"value": "probability_beat_baseline"
},
{
"value": "conversion_number"
}
]
}

Response Fields

FieldTypeDescription
experimentsArrayExperiment documents for the app
performance_metricsArraySupported metric keys (improvement, conversion_rate, etc.)

Error Responses

Authentication/permission failures are returned by the common rights layer.

Behavior

  • Fetches experiments from countly_out.ab_testing_experiments{appId}.
  • For running experiments, recalculates results unless skipCalculation=true.
  • Updates stored results when recalculation runs.

Limitations

  • Use skipCalculation=true for dashboard lists that do not need fresh metrics.
  • Recalculation can be expensive for large datasets.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly_out.ab_testing_experiments{appId}Primary:Experiment definitions and results.