Experiments
A/B tests.
8 نقاط وصول. أسماء نقاط الوصول وأوصافها مأخوذة من ملف OpenAPI، لذلك تظهر بالإنجليزية.
GET /v1/experimentsPOST /v1/experimentsGET /v1/experiments/{experiment_id}PATCH /v1/experiments/{experiment_id}DELETE /v1/experiments/{experiment_id}POST /v1/experiments/{experiment_id}/startPOST /v1/experiments/{experiment_id}/stopGET /v1/experiments/{experiment_id}/results
GET
/v1/experimentsList A/B tests
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
cursor | query | string | null | لا | max length 200 |
limit | query | integer | لا | default 50 · min 1 · max 200 |
الردود
- 200Successful Response
Page_ExperimentOut_
POST
/v1/experimentsExperiments Create
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
Idempotency-Key | header | string | null | لا | Unique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$ |
جسم الطلب application/json ExperimentIn
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
name | string | نعم | max length 200 |
kind | "ranking" | "synonyms" | "rules" | "ai_rewrite" | نعم | |
variants | Variant[] | نعم | |
primary_metric | "ctr" | "conversion" | "zero_result_rate" | "add_to_cart_rate" | لا | default "ctr" |
traffic_percent | integer | لا | default 100 · min 1 · max 100 |
الردود
- 201Successful Response
ExperimentOut
GET
/v1/experiments/{experiment_id}Experiments Get
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
experiment_id | path | string | نعم |
الردود
- 200Successful Response
ExperimentOut
PATCH
/v1/experiments/{experiment_id}Experiments Update
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
experiment_id | path | string | نعم |
جسم الطلب application/json ExperimentPatch
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
name | string | null | لا | max length 200 |
variants | Variant[] | null | لا | |
traffic_percent | integer | null | لا | min 1 · max 100 |
الردود
- 200Successful Response
ExperimentOut
DELETE
/v1/experiments/{experiment_id}Experiments Delete
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
experiment_id | path | string | نعم |
الردود
- 200Successful Response
Deleted
POST
/v1/experiments/{experiment_id}/startExperiments Start
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
experiment_id | path | string | نعم |
الردود
- 200Successful Response
ExperimentOut
POST
/v1/experiments/{experiment_id}/stopExperiments Stop
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
experiment_id | path | string | نعم |
الردود
- 200Successful Response
ExperimentOut
GET
/v1/experiments/{experiment_id}/resultsResults with a significance test
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
experiment_id | path | string | نعم |
الردود
- 200Successful Response
ExperimentResults
أشكال البيانات في هذه الصفحة
Page_ExperimentOut_
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
data | ExperimentOut[] | نعم | |
next_cursor | string | null | لا | |
total | integer | null | لا | Present when cheap to count. |
ExperimentOut
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
name | string | نعم | max length 200 |
kind | "ranking" | "synonyms" | "rules" | "ai_rewrite" | نعم | |
variants | Variant[] | نعم | |
primary_metric | "ctr" | "conversion" | "zero_result_rate" | "add_to_cart_rate" | لا | default "ctr" |
traffic_percent | integer | لا | default 100 · min 1 · max 100 |
id | string | نعم | |
status | "draft" | "running" | "stopped" | "completed" | نعم | |
started_at | string (date-time) | null | لا | |
ended_at | string (date-time) | null | لا | |
created_at | string (date-time) | نعم |
Variant
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
key | string | نعم | max length 16 |
weight | integer | نعم | min 0 · max 100 |
config | RankingConfig | لا | Only the fields that differ from the tenant's saved settings. |
RankingConfig
One ranking setup, used by the dashboard playground (`SearchRequest.config_override`) and by A/B variants (`Variant.config`). Every field is optional: a missing field means "use the tenant's saved value" (`TenantSettings.search`, same field names). Nothing here is saved.
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
ai_rewrite | boolean | null | لا | |
rule_parser | boolean | null | لا | |
in_stock_first | boolean | null | لا | |
business_signals | map<string, number> | null | لا | Weights 0..1, e.g. {popularity: 0.2, margin: 0.1}. {} turns them all off. |
typo_tolerance | boolean | null | لا | |
hybrid_search | boolean | null | لا | |
cheap_rerank_top_n | integer | null | لا | min 10 · max 200 |
merch_rules | boolean | null | لا | false = ignore all merchandising rules. |
disabled_rule_ids | string[] | null | لا | |
synonym_sets | string[] | null | لا | Tenant synonym sets that are on. "default" is the normal set. Example A/B: A = ["default"], B = ["default", "winter-2026"]. |
global_synonyms | boolean | null | لا | false = ignore the platform's global synonyms. |
ExperimentIn
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
name | string | نعم | max length 200 |
kind | "ranking" | "synonyms" | "rules" | "ai_rewrite" | نعم | |
variants | Variant[] | نعم | |
primary_metric | "ctr" | "conversion" | "zero_result_rate" | "add_to_cart_rate" | لا | default "ctr" |
traffic_percent | integer | لا | default 100 · min 1 · max 100 |
ExperimentPatch
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
name | string | null | لا | max length 200 |
variants | Variant[] | null | لا | |
traffic_percent | integer | null | لا | min 1 · max 100 |
Deleted
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
deleted | boolean | لا | default true |
id | string | نعم |
ExperimentResults
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
experiment_id | string | نعم | |
primary_metric | string | نعم | |
variants | VariantResult[] | نعم | |
p_value | number | null | لا | The p-value used for `significant` (see `method`). |
significant | boolean | لا | default false |
winner | string | null | لا | |
method | string | لا | How significance was computed.default "two-proportion z-test, alpha 0.05" |
updated_at | string (date-time) | نعم | |
guidance | ExperimentGuidance | null | لا |
VariantResult
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
key | string | نعم | |
searches | integer | نعم | |
metric_value | number | نعم | |
ci_low | number | نعم | |
ci_high | number | نعم | |
sessions | integer | null | لا | Shopper sessions in this variant (the test's unit). |
ExperimentGuidance
What to do now, and how big the test must be. Safe to read at any time (no peeking problem).
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
state | "not_started" | "collecting" | "keep_running" | "wait_full_week" | "winner" | "no_clear_difference" | "stopped_early" | "check_traffic_split" | نعم | Stable key for the dashboard text. |
advice | string | نعم | The same in plain English. |
min_sessions_per_variant | integer | نعم | |
min_days | integer | نعم | Days a test must run before a winner is shown (one full week). |
days_running | number | نعم | |
planned_sessions_per_variant | integer | null | لا | Sessions per variant for `power` to find a `mde_relative` change (always-valid test). |
fixed_horizon_sessions_per_variant | integer | null | لا | The classic fixed-sample size, for reference (smaller; valid only if read once). |
progress | number | null | لا | Smallest variant's sessions / planned sessions. |
sessions_per_day | number | null | لا | Sessions in the test per day so far (or expected). |
days_to_plan | number | null | لا | Expected days left until the planned size. |
baseline | number | null | لا | Rate of the primary metric the plan is based on. |
baseline_source | "control" | "history" | "none" | لا | default "none" |
mde_relative | number | نعم | Smallest relative change the plan is sized for, e.g. 0.1 = 10%. |
power | number | نعم | |
p_value_fixed_horizon | number | null | لا | Classic z-test p-value. Not for decisions while the test runs (peeking). |
srm_p_value | number | null | لا | Traffic split check (chi-square). |
srm_alarm | boolean | لا | default false |