summaryrefslogtreecommitdiff
path: root/doc/api/experiments.md
blob: 7e2cad1070b3ee4bf8e31c81b3b82f7119e20127 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
stage: Growth
group: Expansion
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
---

# Experiments API

> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/262725) in GitLab 13.5.

This API is for listing A/B experiments [defined in GitLab](../development/experiment_guide/index.md).

The user must be a [GitLab team member](https://gitlab.com/groups/gitlab-com/-/group_members) to access the API.

## 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>" "https://gitlab.example.com/api/v4/experiments"
```

Example response:

```json
[
    {
      "key": "experiment_1",
      "enabled": true
    },
    {
      "key": "experiment_2",
      "enabled": false
    }
]
```