mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-03 16:04:30 +00:00
86 lines
2.1 KiB
Markdown
86 lines
2.1 KiB
Markdown
---
|
|
stage: Growth
|
|
group: Acquisition
|
|
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
|
title: Experiments API
|
|
---
|
|
|
|
{{< details >}}
|
|
|
|
- Tier: Free, Premium, Ultimate
|
|
- Offering: GitLab.com
|
|
|
|
{{< /details >}}
|
|
|
|
Use this API to interact with A/B experiments. This API is for internal use only.
|
|
|
|
Prerequisites:
|
|
|
|
- You must be a [GitLab team member](https://gitlab.com/groups/gitlab-com/-/group_members).
|
|
|
|
## List all experiments
|
|
|
|
Get a list of all experiments. Each experiment has an `enabled` status that indicates whether the experiment is enabled globally, or only in specific contexts.
|
|
|
|
```plaintext
|
|
GET /experiments
|
|
```
|
|
|
|
```shell
|
|
curl --header "PRIVATE-TOKEN: <your_access_token>" \
|
|
--url "https://gitlab.example.com/api/v4/experiments"
|
|
```
|
|
|
|
Example response:
|
|
|
|
```json
|
|
[
|
|
{
|
|
"key": "code_quality_walkthrough",
|
|
"definition": {
|
|
"name": "code_quality_walkthrough",
|
|
"introduced_by_url": "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58900",
|
|
"rollout_issue_url": "https://gitlab.com/gitlab-org/gitlab/-/issues/327229",
|
|
"milestone": "13.12",
|
|
"type": "experiment",
|
|
"group": "group::activation",
|
|
"default_enabled": false
|
|
},
|
|
"current_status": {
|
|
"state": "conditional",
|
|
"gates": [
|
|
{
|
|
"key": "boolean",
|
|
"value": false
|
|
},
|
|
{
|
|
"key": "percentage_of_actors",
|
|
"value": 25
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"key": "ci_runner_templates",
|
|
"definition": {
|
|
"name": "ci_runner_templates",
|
|
"introduced_by_url": "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58357",
|
|
"rollout_issue_url": "https://gitlab.com/gitlab-org/gitlab/-/issues/326725",
|
|
"milestone": "14.0",
|
|
"type": "experiment",
|
|
"group": "group::activation",
|
|
"default_enabled": false
|
|
},
|
|
"current_status": {
|
|
"state": "off",
|
|
"gates": [
|
|
{
|
|
"key": "boolean",
|
|
"value": false
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
```
|