Skip to content

Commit 21619c8

Browse files
committed
feat(abtesting): add documentation for /schedule endpoint
1 parent 2d0827d commit 21619c8

File tree

4 files changed

+78
-0
lines changed

4 files changed

+78
-0
lines changed

specs/abtesting/common/parameters.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ abTestID:
1818
description: Unique A/B test identifier.
1919
example: 224
2020

21+
abTestScheduleID:
22+
type: integer
23+
description: Unique scheduled A/B test identifier.
24+
example: 224
25+
2126
endAt:
2227
type: string
2328
description: End date and time of the A/B test, in RFC 3339 format.
@@ -33,6 +38,11 @@ updatedAt:
3338
description: Date and time when the A/B test was last updated, in RFC 3339 format.
3439
example: 2023-06-15T15:06:44.400601Z
3540

41+
scheduledAt:
42+
type: string
43+
description: Date and time when the A/B test scheduled to start, in RFC 3339 format.
44+
example: 2023-06-15T15:06:44.400601Z
45+
3646
name:
3747
type: string
3848
description: A/B test name.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ScheduledABTestResponse:
2+
type: object
3+
additionalProperties: false
4+
properties:
5+
abTestScheduleID:
6+
$ref: '../parameters.yml#/abTestScheduleID'
7+
required:
8+
- abTestScheduleID
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
post:
2+
tags:
3+
- abtest
4+
operationId: scheduleABTest
5+
x-acl:
6+
- editSettings
7+
summary: Schedule an A/B test
8+
description: |
9+
Schedule an A/B test to be started at a later time.
10+
requestBody:
11+
required: true
12+
content:
13+
application/json:
14+
schema:
15+
title: addABTestsRequest
16+
type: object
17+
additionalProperties: false
18+
properties:
19+
name:
20+
$ref: '../common/parameters.yml#/name'
21+
variants:
22+
type: array
23+
description: A/B test variants.
24+
minItems: 2
25+
maxItems: 2
26+
items:
27+
$ref: '../common/schemas/AddABTestsVariant.yml#/AddABTestsVariant'
28+
scheduledAt:
29+
$ref: '../common/parameters.yml#/scheduledAt'
30+
endAt:
31+
$ref: '../common/parameters.yml#/endAt'
32+
required:
33+
- name
34+
- variants
35+
- scheduledAt
36+
- endAt
37+
responses:
38+
'200':
39+
description: OK
40+
headers:
41+
x-ratelimit-limit:
42+
$ref: '../../analytics/common/parameters.yml#/x-ratelimit-limit'
43+
x-ratelimit-remaining:
44+
$ref: '../../analytics/common/parameters.yml#/x-ratelimit-remaining'
45+
x-ratelimit-reset:
46+
$ref: '../../analytics/common/parameters.yml#/x-ratelimit-reset'
47+
content:
48+
application/json:
49+
schema:
50+
$ref: '../common/schemas/ScheduledABTestResponse.yml#/ScheduledABTestResponse'
51+
'400':
52+
$ref: '../../common/responses/BadRequest.yml'
53+
'402':
54+
$ref: '../../common/responses/FeatureNotEnabled.yml'
55+
'403':
56+
$ref: '../../common/responses/MethodNotAllowed.yml'
57+
'404':
58+
$ref: '../../common/responses/IndexNotFound.yml'

specs/abtesting/spec.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,5 @@ paths:
9696
$ref: 'paths/abtest.yml'
9797
/2/abtests/{id}/stop:
9898
$ref: 'paths/stopABTest.yml'
99+
/2/abtests/schedule:
100+
$ref: 'paths/scheduleABTest.yml'

0 commit comments

Comments
 (0)