Skip to content

feat: update specs #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 125 additions & 41 deletions src/data/abtesting.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
"url": "https://analytics.{region}.algolia.com",
"variables": {
"region": {
"definition": "The log region is configured at the application level.",
"enum": ["us", "de"],
"description": "The region where your Algolia application is hosted.",
"enum": [
"us",
"de"
],
"default": "us"
}
}
Expand Down Expand Up @@ -74,8 +77,7 @@
"404": {
"$ref": "#/components/responses/IndexNotFound"
}
},
"tags": ["abtesting"]
}
},
"post": {
"operationId": "customPost",
Expand Down Expand Up @@ -122,8 +124,7 @@
"404": {
"$ref": "#/components/responses/IndexNotFound"
}
},
"tags": ["abtesting"]
}
},
"put": {
"operationId": "customPut",
Expand Down Expand Up @@ -170,8 +171,7 @@
"404": {
"$ref": "#/components/responses/IndexNotFound"
}
},
"tags": ["abtesting"]
}
},
"delete": {
"operationId": "customDelete",
Expand Down Expand Up @@ -208,15 +208,18 @@
"404": {
"$ref": "#/components/responses/IndexNotFound"
}
},
"tags": ["abtesting"]
}
}
},
"/2/abtests": {
"post": {
"tags": ["abtesting"],
"tags": [
"abtest"
],
"operationId": "addABTests",
"x-acl": ["editSettings"],
"x-acl": [
"editSettings"
],
"summary": "Create an A/B test",
"description": "Creates a new A/B test.",
"requestBody": {
Expand Down Expand Up @@ -244,7 +247,11 @@
"$ref": "#/components/schemas/endAt"
}
},
"required": ["name", "variants", "endAt"]
"required": [
"name",
"variants",
"endAt"
]
}
}
}
Expand Down Expand Up @@ -286,9 +293,14 @@
}
},
"get": {
"tags": ["abtesting"],
"tags": [
"abtest"
],
"operationId": "listABTests",
"x-acl": ["analytics"],
"x-mcp-tool": true,
"x-acl": [
"analytics"
],
"summary": "List all A/B tests",
"description": "Lists all A/B tests you configured for this application.",
"parameters": [
Expand Down Expand Up @@ -367,7 +379,11 @@
"example": 12
}
},
"required": ["abtests", "count", "total"]
"required": [
"abtests",
"count",
"total"
]
}
}
}
Expand All @@ -389,9 +405,13 @@
},
"/2/abtests/{id}": {
"get": {
"tags": ["abtesting"],
"tags": [
"abtest"
],
"operationId": "getABTest",
"x-acl": ["analytics"],
"x-acl": [
"analytics"
],
"summary": "Retrieve A/B test details",
"description": "Retrieves the details for an A/B test by its ID.",
"parameters": [
Expand Down Expand Up @@ -436,9 +456,13 @@
}
},
"delete": {
"tags": ["abtesting"],
"tags": [
"abtest"
],
"operationId": "deleteABTest",
"x-acl": ["editSettings"],
"x-acl": [
"editSettings"
],
"summary": "Delete an A/B test",
"description": "Deletes an A/B test by its ID.",
"parameters": [
Expand Down Expand Up @@ -485,9 +509,13 @@
},
"/2/abtests/{id}/stop": {
"post": {
"tags": ["abtesting"],
"tags": [
"abtest"
],
"operationId": "stopABTest",
"x-acl": ["editSettings"],
"x-acl": [
"editSettings"
],
"summary": "Stop an A/B test",
"description": "Stops an A/B test by its ID.\n\nYou can't restart stopped A/B tests.\n",
"parameters": [
Expand Down Expand Up @@ -534,9 +562,13 @@
},
"/2/abtests/schedule": {
"post": {
"tags": ["abtesting"],
"tags": [
"abtest"
],
"operationId": "scheduleABTest",
"x-acl": ["editSettings"],
"x-acl": [
"editSettings"
],
"summary": "Schedule an A/B test",
"description": "Schedule an A/B test to be started at a later time.\n",
"requestBody": {
Expand Down Expand Up @@ -567,7 +599,12 @@
"$ref": "#/components/schemas/endAt"
}
},
"required": ["name", "variants", "scheduledAt", "endAt"]
"required": [
"name",
"variants",
"scheduledAt",
"endAt"
]
}
}
}
Expand Down Expand Up @@ -611,9 +648,13 @@
},
"/2/abtests/estimate": {
"post": {
"tags": ["abtesting"],
"tags": [
"abtest"
],
"operationId": "estimateABTest",
"x-acl": ["analytics"],
"x-acl": [
"analytics"
],
"summary": "Estimate the sample size and duration of an A/B test",
"description": "Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.",
"requestBody": {
Expand All @@ -640,7 +681,9 @@
"$ref": "#/components/schemas/MinimumDetectableEffect"
}
},
"required": ["minimumDetectableEffect"]
"required": [
"minimumDetectableEffect"
]
},
"variants": {
"type": "array",
Expand All @@ -652,7 +695,10 @@
}
}
},
"required": ["configuration", "variants"]
"required": [
"configuration",
"variants"
]
}
}
}
Expand Down Expand Up @@ -698,7 +744,9 @@
"get": {
"x-helper": true,
"x-asynchronous-helper": false,
"tags": ["abtesting"],
"tags": [
"Api Key"
],
"operationId": "setClientApiKey",
"summary": "Switch the API key used to authenticate requests",
"description": "Switch the API key used to authenticate requests.\n",
Expand Down Expand Up @@ -808,7 +856,12 @@
"type": "string",
"description": "A/B test status.\n\n- `active`. The A/B test is live and search traffic is split between the two variants.\n- `stopped`. You stopped the A/B test. The A/B test data is still available for analysis.\n- `expired`. The A/B test was automatically stopped after reaching its end date.\n- `failed`. Creating the A/B test failed.\n",
"example": "active",
"enum": ["active", "stopped", "expired", "failed"]
"enum": [
"active",
"stopped",
"expired",
"failed"
]
},
"currency": {
"type": "object",
Expand Down Expand Up @@ -1135,7 +1188,12 @@
"EffectMetric": {
"type": "string",
"description": "Metric for which you want to detect the smallest relative difference.",
"enum": ["addToCartRate", "clickThroughRate", "conversionRate", "purchaseRate"]
"enum": [
"addToCartRate",
"clickThroughRate",
"conversionRate",
"purchaseRate"
]
},
"MinimumDetectableEffect": {
"type": "object",
Expand All @@ -1152,7 +1210,10 @@
"$ref": "#/components/schemas/EffectMetric"
}
},
"required": ["size", "metric"]
"required": [
"size",
"metric"
]
},
"ABTestConfiguration": {
"title": "configuration",
Expand Down Expand Up @@ -1271,7 +1332,15 @@
"$ref": "#/components/schemas/ABTestConfiguration"
}
},
"required": ["status", "name", "createdAt", "endAt", "updatedAt", "abTestID", "variants"]
"required": [
"status",
"name",
"createdAt",
"endAt",
"updatedAt",
"abTestID",
"variants"
]
},
"ABTests": {
"oneOf": [
Expand Down Expand Up @@ -1301,7 +1370,10 @@
"$ref": "#/components/schemas/description"
}
},
"required": ["index", "trafficPercentage"]
"required": [
"index",
"trafficPercentage"
]
},
"customSearchParams": {
"type": "object",
Expand All @@ -1316,8 +1388,12 @@
"type": "object"
}
},
"required": ["customSearchParameters"],
"x-discriminator-fields": ["customSearchParameters"]
"required": [
"customSearchParameters"
],
"x-discriminator-fields": [
"customSearchParameters"
]
},
"abTestsVariantSearchParams": {
"allOf": [
Expand Down Expand Up @@ -1359,7 +1435,11 @@
"$ref": "#/components/schemas/taskID"
}
},
"required": ["abTestID", "index", "taskID"]
"required": [
"abTestID",
"index",
"taskID"
]
},
"scheduledAt": {
"type": "string",
Expand All @@ -1379,7 +1459,9 @@
"$ref": "#/components/schemas/abTestScheduleID"
}
},
"required": ["abTestScheduleID"]
"required": [
"abTestScheduleID"
]
},
"EstimateABTestResponse": {
"type": "object",
Expand Down Expand Up @@ -1472,7 +1554,9 @@
"x-tagGroups": [
{
"name": "General",
"tags": ["abtest"]
"tags": [
"abtest"
]
}
]
}
}
Loading