Skip to main content

Get Experiment Distribution

GET/v2/project/{project_key}/experiment/{test_id}/distribution

Return configured per-variant traffic splits for an experiment — a compact alternative to Get Experiment Details when you only need allocation weights.

Path parameters

ParameterDescription
project_keyYour project's API key
test_idThe numeric experiment ID

Example

curl "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/experiment/1234/distribution" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY"

Success response

{
"success": true,
"test_id": 1234,
"test_name": "Homepage CTA Button Color Test",
"status": "live",
"traffic_allocation": 100,
"distribution_mode": "custom",
"is_mab": false,
"variants": [
{
"variant_id": "0",
"name": "Control",
"traffic_weight": 50,
"variant_status": "active"
},
{
"variant_id": "1",
"name": "Red CTA Button",
"traffic_weight": 50,
"variant_status": "active"
}
]
}

Response fields

FieldTypeDescription
test_idintegerUnique experiment ID
test_namestringExperiment name
statusstringHuman-readable label: "draft", "live", or "inactive"
traffic_allocationnumberPercent of eligible site visitors included in the experiment (0–100). The remainder is excluded from the test entirely.
distribution_modestringHow traffic is split among arms: "equal" (default even split), "custom" (saved custom distribution), or "mab" (multi-armed bandit — dynamic splits).
is_mabbooleantrue when smart optimization (MAB) is enabled.
variantsarrayPer-variant distribution objects (control listed first)

Variant fields

FieldTypeDescription
variant_idstringVariant identifier ("0" = control)
namestringVariant display name
traffic_weightnumber | nullConfigured share of experiment traffic for this arm (0–100). Sums to 100 across active arms for equal and custom modes. null when is_mab is true because splits are computed dynamically.
variant_statusstring"active" when traffic_weight is greater than 0, or "paused" when the configured weight is 0. For MAB tests, always "active".
Configured vs realized traffic

traffic_weight reflects the configured split saved in experiment settings — not realized visitor counts from results. To compare configured allocation against actual traffic share, combine this endpoint with Get Experiment Result or Get Experiment Timeseries.

MAB tests

When distribution_mode is "mab", per-variant traffic_weight is null. Use realized visitor shares from result or timeseries endpoints to describe current MAB allocation.

Error responses

StatusMeaning
400Invalid test_id
401Invalid or missing API key
404Experiment not found or belongs to a different project
Next step

Need conversion stats alongside configured splits? Use Get Experiment Result — each variant row also includes traffic_weight and variant_status.