Skip to content

Commit c5d5d83

Browse files
committed
doc(abtests) add timeseries endpoint for v3 + add confidence interval values in variant schema
1 parent 24f8eef commit c5d5d83

File tree

4 files changed

+89
-0
lines changed

4 files changed

+89
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Timeseries:
2+
type: object
3+
additionalProperties: false
4+
properties:
5+
abTestID:
6+
$ref: "../parameters.yml#/abTestID"
7+
variants:
8+
$ref: "#/timeseriesVariants"
9+
required:
10+
- abTestID
11+
- variants
12+
13+
timeseriesVariants:
14+
type: array
15+
description: |
16+
A/B test timeseries variants.
17+
18+
The first variant is your _control_ index, typically your production index.
19+
All of the additional variants are indexes with changed settings that you want to test against the control.
20+
items:
21+
$ref: "#/timeseriesVariant"
22+
23+
timeseriesVariant:
24+
type: object
25+
properties:
26+
dates:
27+
$ref: "#/metricDates"
28+
29+
metricDates:
30+
type: array
31+
items:
32+
$ref: "#/metricDate"
33+
34+
metricDate:
35+
type: object
36+
properties:
37+
date:
38+
type: string
39+
description: Date where the metric was updated, in RFC 3339 format.
40+
format: date
41+
example: 2025-06-15
42+
metrics:
43+
$ref: "Variant.yml#/metrics"

specs/abtesting-v3/common/schemas/Variant.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,22 @@ metric:
5353
value:
5454
type: number
5555
format: double
56+
valueCIHigh:
57+
type: number
58+
format: double
59+
valueCILow:
60+
type: number
61+
format: double
5662
pValue:
5763
type: number
5864
format: double
5965
description: PValue for the first variant (control) will always be 0. For the other variants, pValue is calculated for the current variant based on the control.
66+
pValueCIHigh:
67+
type: number
68+
format: double
69+
pValueCILow:
70+
type: number
71+
format: double
6072
dimension:
6173
type: string
6274
description: Dimension defined during test creation
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
get:
2+
tags:
3+
- abtest
4+
operationId: getTimeseries
5+
x-acl:
6+
- analytics
7+
summary: Retrieve timeseries of an A/B test
8+
description: Retrieves timeseries for an A/B test by its ID.
9+
parameters:
10+
- $ref: '../common/parameters.yml#/ID'
11+
responses:
12+
'200':
13+
description: OK
14+
headers:
15+
x-ratelimit-limit:
16+
$ref: '../../common/responses/rateLimit.yml#/x-ratelimit-limit'
17+
x-ratelimit-remaining:
18+
$ref: '../../common/responses/rateLimit.yml#/x-ratelimit-remaining'
19+
x-ratelimit-reset:
20+
$ref: '../../common/responses/rateLimit.yml#/x-ratelimit-reset'
21+
content:
22+
application/json:
23+
schema:
24+
$ref: '../common/schemas/Timeseries.yml#/Timeseries'
25+
'400':
26+
$ref: '../../common/responses/BadRequest.yml'
27+
'402':
28+
$ref: '../../common/responses/FeatureNotEnabled.yml'
29+
'403':
30+
$ref: '../../common/responses/MethodNotAllowed.yml'
31+
'404':
32+
$ref: '../../common/responses/IndexNotFound.yml'

specs/abtesting-v3/spec.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ paths:
101101
$ref: "paths/scheduleABTest.yml"
102102
/3/abtests/estimate:
103103
$ref: "paths/estimate.yml"
104+
/3/abtests/{id}/timeseries:
105+
$ref: "paths/timeseries.yml"
104106

105107
# ###############
106108
# ### Helpers ###

0 commit comments

Comments
 (0)