# Check an experiment's variant against a bar, for CI

Source: <https://everruns.com/docs/api/operations/gate_eval_experiment/>

[Docs](https://everruns.com/docs/)/[API reference](https://everruns.com/docs/api/)/[Evaluation & reporting](https://everruns.com/docs/api/groups/evaluation-reporting/)/Check an experiment's variant against a bar, for CI

# Check an experiment's variant against a bar, for CI

Preview

Check an experiment’s variant against a bar, for CI. Answers 409 while runs are going and 422 when the variant misses the bar, so the command exits non-zero.

Public APIRequires the evals feature flag

GET`/v1/evals/{eval_id}/experiments/{experiment_id}/gate`

See [authentication](https://everruns.com/docs/sre/runbooks/authentication/) for credentials and permissions.

## Parameters

### Path Parameters

**eval_id**

required

string

Prefixed public identifier

**experiment_id**

required

string

Prefixed public identifier

## Responses

200Success

### 200

Success

Media typeapplication/json

Result of an experiment gate that passed.

object

**pass_rate**

required

number format: double

**passed**

required

boolean

**passed_every_trial**

required

Share of cases passed in every trial (pass^k).

number format: double

**variant**

required

The variant the gate judged.

string

**verdict**

One of:

* string

  How a variant compares with the baseline.

  string

  Allowed values: improvement regression within_noise not_enough_data

* null

  null

### Example

```json
{
  "pass_rate": 0.93,
  "passed_every_trial": 0.9,
  "variant": "candidate",
  "verdict": "improvement"
}
```

404Experiment not found

### 404

Experiment not found

409Some variant's run is still going

### 409

Some variant’s run is still going

422The variant missed the bar

### 422

The variant missed the bar

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/evals/example/experiments/example/gate';
const options = {method: 'GET'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

Request

```sh
curl --request GET \
  --url https://app.everruns.com/api/v1/evals/example/experiments/example/gate
```

Additional language examples require JavaScript. The default request example is available above.

200404409422

200 · Success

```json
{
  "pass_rate": 0.93,
  "passed": true,
  "passed_every_trial": 0.9,
  "variant": "candidate"
}
```

404 · Experiment not found

No response body example is declared for this status.

409 · Some variant's run is still going

No response body example is declared for this status.

422 · The variant missed the bar

No response body example is declared for this status.

## Matching endpoints