Skip to content

Commit 97d79a3

Browse files
committed
docs(abtests) v3 api
1 parent 2f7d20e commit 97d79a3

File tree

13 files changed

+966
-0
lines changed

13 files changed

+966
-0
lines changed
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# path
2+
ID:
3+
in: path
4+
name: id
5+
description: Unique A/B test identifier.
6+
required: true
7+
schema:
8+
$ref: "#/abTestID"
9+
10+
# misc
11+
index:
12+
type: string
13+
description: Index name of the A/B test variant (case-sensitive).
14+
example: "delcourt_production"
15+
16+
abTestID:
17+
type: integer
18+
description: Unique A/B test identifier.
19+
example: 224
20+
21+
abTestScheduleID:
22+
type: integer
23+
description: Unique scheduled A/B test identifier.
24+
example: 224
25+
26+
endAt:
27+
type: string
28+
description: End date and time of the A/B test, in RFC 3339 format.
29+
example: 2023-06-17T00:00:00Z
30+
31+
createdAt:
32+
type: string
33+
description: Date and time when the A/B test was created, in RFC 3339 format.
34+
example: 2023-06-15T15:06:04.249906Z
35+
36+
updatedAt:
37+
type: string
38+
description: Date and time when the A/B test was last updated, in RFC 3339 format.
39+
example: 2023-06-15T15:06:44.400601Z
40+
41+
scheduledAt:
42+
type: string
43+
description: Date and time when the A/B test is scheduled to start, in RFC 3339 format.
44+
example: 2023-06-15T15:06:44.400601Z
45+
46+
name:
47+
type: string
48+
description: A/B test name.
49+
example: Custom ranking sales rank test
50+
51+
description:
52+
type: string
53+
description: Description for this variant.
54+
example: Current production index
55+
56+
trafficPercentage:
57+
type: integer
58+
description: Percentage of search requests each variant receives.
59+
minimum: 0
60+
maximum: 100
61+
example: 60
62+
63+
currencies:
64+
type: object
65+
description: A/B test currencies.
66+
example:
67+
USD:
68+
currency: USD
69+
revenue: 120.0
70+
mean: 53.7
71+
standardDeviation: 12.3
72+
EUR:
73+
currency: EUR
74+
revenue: 100.0
75+
mean: 43.7
76+
standardDeviation: 10.3
77+
additionalProperties:
78+
$ref: "#/currency"
79+
x-additionalPropertiesName: currency code
80+
81+
currency:
82+
type: object
83+
properties:
84+
currency:
85+
type: string
86+
description: Currency code.
87+
example: "USD"
88+
revenue:
89+
type: number
90+
format: double
91+
description: Revenue for this currency.
92+
example: 120.0
93+
mean:
94+
type: number
95+
format: double
96+
description: Mean for this currency.
97+
example: 53.7
98+
standardDeviation:
99+
type: number
100+
format: double
101+
description: Standard deviation for this currency.
102+
example: 12.3
103+
104+
filterEffects:
105+
type: object
106+
description: A/B test filter effects resulting from configuration settings.
107+
properties:
108+
outliers:
109+
title: outliersFilter
110+
type: object
111+
description: Outliers removed from the A/B test as a result of configuration settings.
112+
example:
113+
usersCount: 1
114+
trackedSearchesCount: 237
115+
properties:
116+
usersCount:
117+
type: integer
118+
description: Number of users removed from the A/B test.
119+
example: 1
120+
trackedSearchesCount:
121+
type: integer
122+
description: Number of tracked searches removed from the A/B test.
123+
example: 237
124+
emptySearch:
125+
title: emptySearchFilter
126+
type: object
127+
description: Empty searches removed from the A/B test as a result of configuration settings.
128+
example:
129+
usersCount: 1
130+
trackedSearchesCount: 237
131+
properties:
132+
usersCount:
133+
type: integer
134+
description: Number of users removed from the A/B test.
135+
example: 1
136+
trackedSearchesCount:
137+
type: integer
138+
description: Number of tracked searches removed from the A/B test.
139+
example: 237
140+
141+
metric:
142+
type: object
143+
description: Defines a metric to be retrieved during an A/B test.
144+
properties:
145+
name:
146+
type: string
147+
description: Name of the metric.
148+
dimension:
149+
type: string
150+
description: Dimension of the metric, for example, in case of a revenue metric it could be USD, EUR...
151+
required:
152+
- name
153+
example:
154+
- name: revenue
155+
dimension: USD
156+
- name: conversionRate
157+
- name: clickThroughRate
158+
- name: trackedSearchCount
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
ABTests:
2+
oneOf:
3+
- type: array
4+
description: A/B tests.
5+
items:
6+
$ref: '#/ABTest'
7+
- type: 'null'
8+
description: No A/B tests are configured for this application.
9+
10+
ABTest:
11+
type: object
12+
additionalProperties: false
13+
properties:
14+
abTestID:
15+
$ref: '../parameters.yml#/abTestID'
16+
clickSignificance:
17+
description: |
18+
A/B test significance calculated from click events.
19+
20+
Values of 0.95 or higher can be considered significant,
21+
that is, the difference between A and B variants is _not_ due to random variations.
22+
Lower values have a.
23+
oneOf:
24+
- type: number
25+
format: double
26+
example: 1
27+
- type: 'null'
28+
conversionSignificance:
29+
description: |
30+
A/B test significance calculated from conversion events.
31+
32+
Values of 0.95 or higher can be considered significant,
33+
that is, the difference between A and B variants is _not_ due to random variations.
34+
oneOf:
35+
- type: number
36+
format: double
37+
example: 1
38+
- type: 'null'
39+
addToCartSignificance:
40+
description: |
41+
A/B test significance calculated from add-to-cart events.
42+
43+
Values of 0.95 or higher can be considered significant,
44+
that is, the difference between A and B variants is _not_ due to random variations.
45+
oneOf:
46+
- type: number
47+
format: double
48+
example: 1
49+
- type: 'null'
50+
purchaseSignificance:
51+
description: |
52+
A/B test significance calculated from purchase events.
53+
54+
Values of 0.95 or higher can be considered significant,
55+
that is, the difference between A and B variants is _not_ due to random variations.
56+
oneOf:
57+
- type: number
58+
format: double
59+
example: 1
60+
- type: 'null'
61+
revenueSignificance:
62+
description: |
63+
A/B test significance calculated from revenue data.
64+
65+
Values of 0.95 or higher can be considered significant,
66+
that is, the difference between A and B variants is _not_ due to random variations.
67+
oneOf:
68+
- type: object
69+
additionalProperties:
70+
type: number
71+
format: double
72+
x-additionalPropertiesName: currency code
73+
example:
74+
USD: 1
75+
EUR: 0.87
76+
- type: 'null'
77+
updatedAt:
78+
$ref: '../parameters.yml#/updatedAt'
79+
createdAt:
80+
$ref: '../parameters.yml#/createdAt'
81+
endAt:
82+
$ref: '../parameters.yml#/endAt'
83+
name:
84+
$ref: '../parameters.yml#/name'
85+
status:
86+
$ref: '#/Status'
87+
variants:
88+
$ref: 'Variant.yml#/variants'
89+
configuration:
90+
$ref: '#/ABTestConfiguration'
91+
required:
92+
- status
93+
- name
94+
- createdAt
95+
- endAt
96+
- updatedAt
97+
- abTestID
98+
- variants
99+
100+
Status:
101+
type: string
102+
description: |
103+
A/B test status.
104+
105+
- `active`. The A/B test is live and search traffic is split between the two variants.
106+
- `stopped`. You stopped the A/B test. The A/B test data is still available for analysis.
107+
- `expired`. The A/B test was automatically stopped after reaching its end date.
108+
- `failed`. Creating the A/B test failed.
109+
example: active
110+
enum:
111+
- active
112+
- stopped
113+
- expired
114+
- failed
115+
116+
ABTestConfiguration:
117+
title: configuration
118+
type: object
119+
description: A/B test configuration.
120+
properties:
121+
outliers:
122+
$ref: '#/Outliers'
123+
emptySearch:
124+
$ref: '#/EmptySearch'
125+
minimumDetectableEffect:
126+
$ref: '#/MinimumDetectableEffect'
127+
128+
Outliers:
129+
type: object
130+
description: Configuration for handling outliers.
131+
properties:
132+
exclude:
133+
type: boolean
134+
description: Whether to exclude outliers when calculating A/B test results.
135+
default: true
136+
137+
EmptySearch:
138+
type: object
139+
description: Configuration for handling empty searches.
140+
properties:
141+
exclude:
142+
type: boolean
143+
description: Whether to exclude empty searches when calculating A/B test results.
144+
145+
MinimumDetectableEffect:
146+
type: object
147+
description: Configuration for the smallest difference between test variants you want to detect.
148+
properties:
149+
size:
150+
type: number
151+
format: double
152+
minimum: 0
153+
maximum: 1
154+
description: |
155+
Smallest difference in an observable metric between variants.
156+
For example, to detect a 10% difference between variants, set this value to 0.1.
157+
metric:
158+
$ref: '#/EffectMetric'
159+
required:
160+
- size
161+
- metric
162+
163+
EffectMetric:
164+
type: string
165+
description: Metric for which you want to detect the smallest relative difference.
166+
enum:
167+
- addToCartRate
168+
- clickThroughRate
169+
- conversionRate
170+
- purchaseRate
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
ABTestResponse:
2+
type: object
3+
additionalProperties: false
4+
properties:
5+
index:
6+
$ref: '../parameters.yml#/index'
7+
abTestID:
8+
$ref: '../parameters.yml#/abTestID'
9+
taskID:
10+
$ref: '../../../common/responses/common.yml#/taskID'
11+
required:
12+
- abTestID
13+
- index
14+
- taskID
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
AddABTestsVariant:
2+
oneOf:
3+
- $ref: '#/abTestsVariant'
4+
- $ref: '#/abTestsVariantSearchParams'
5+
6+
abTestsVariantSearchParams:
7+
allOf:
8+
- $ref: '#/abTestsVariant'
9+
- $ref: '#/customSearchParams'
10+
11+
abTestsVariant:
12+
type: object
13+
additionalProperties: false
14+
properties:
15+
index:
16+
$ref: '../parameters.yml#/index'
17+
trafficPercentage:
18+
$ref: '../parameters.yml#/trafficPercentage'
19+
description:
20+
$ref: '../parameters.yml#/description'
21+
required:
22+
- index
23+
- trafficPercentage
24+
25+
customSearchParams:
26+
type: object
27+
description: |
28+
Search parameters to add to the test variant.
29+
Only use this parameter if the two variants use the same index.
30+
example: {'typoTolerance': false, 'synonyms': false}
31+
additionalProperties: false
32+
properties:
33+
customSearchParameters:
34+
type: object
35+
required:
36+
- customSearchParameters
37+
x-discriminator-fields:
38+
- customSearchParameters

0 commit comments

Comments
 (0)