Project Thresholds REST API


List thresholds for a project


⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.

List all thresholds for a project. If the project is public, then the user does not need to be authenticated. If the project is private, then the user must be authenticated and have `view` permissions for the project. By default, the thresholds are sorted by creation date time in chronological order.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


project

string

Required

The slug or UUID for a project.

Query Parameters


direction

string

The direction to sort by. If not specified, the default sort direction is used.

Default: asc

One of: asc, desc


page

integer

The page number to return. If not specified, the first page is returned.

Default: 1


per_page

integer

The number of items to return per page. If not specified, the default number of items per page (8) is used.

Default: 8


sort

string

The field to sort by. If not specified, the default sort field is used.

One of: created, modified


branch

string

Filter by branch name, exact match.


measure

string

Filter by measure name, exact match.


testbed

string

Filter by testbed name, exact match.

GET

/v0/projects/{project}/thresholds

Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher threshold list PROJECT

View OpenAPI Spec

Create a threshold


⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.

Create a threshold for a project. The user must have `create` permissions for the project. There can only be one threshold for any unique combination of: branch, testbed, and measure.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Required

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


project

string

Required

The slug or UUID for a project.

Body Parameters


branch

string

Required

The UUID, slug, or name of the threshold branch.


lower_boundary

number

The lower boundary used to calculate the lower boundary limit. The requirements for this field depend on which `test` is selected.


max_sample_size

integer

The maximum number of samples used to perform the test. Only the most recent samples will be used if there are more.


measure

string

Required

The UUID, slug, or name of the threshold measure.


min_sample_size

integer

The minimum number of samples required to perform the test. If there are fewer samples, the test will not be performed.


test

string

Required

The test used by the threshold model to calculate the baseline and boundary limits.

One of: static, percentage, z_score, t_test, log_normal, iqr, delta_iqr


testbed

string

Required

The UUID, slug, or name of the threshold testbed.


upper_boundary

number

The upper boundary used to calculate the upper boundary limit. The requirements for this field depend on which `test` is selected.


window

integer

The window of time for samples used to perform the test, in seconds. Samples outside of this window will be omitted.

POST

/v0/projects/{project}/thresholds

Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher threshold create PROJECT

View OpenAPI Spec

View a threshold


⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.

View a threshold for a project. If the project is public, then the user does not need to be authenticated. If the project is private, then the user must be authenticated and have `view` permissions for the project.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


project

string

Required

The slug or UUID for a project.


threshold

string

Required

The UUID for a threshold.

Query Parameters


model

string

View the threshold with the specified model UUID. This can be useful for viewing thresholds with historical models that have since been replaced by a new model. If not specified, then the current model is used.

GET

/v0/projects/{project}/thresholds/{threshold}

Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher threshold view PROJECT THRESHOLD

View OpenAPI Spec

Update a threshold


⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.

Update a threshold for a project. The user must have `edit` permissions for the project. The new model will be added to the threshold and used going forward. The old model will be replaced but still show up in the report history and alerts created when it was active.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Required

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


project

string

Required

The slug or UUID for a project.


threshold

string

Required

The UUID for a threshold.

Body Parameters


lower_boundary

number

The lower boundary used to calculate the lower boundary limit. The requirements for this field depend on which `test` is selected.


max_sample_size

integer

The maximum number of samples used to perform the test. Only the most recent samples will be used if there are more.


min_sample_size

integer

The minimum number of samples required to perform the test. If there are fewer samples, the test will not be performed.


test

string

Required

The test used by the threshold model to calculate the baseline and boundary limits.

One of: static, percentage, z_score, t_test, log_normal, iqr, delta_iqr


upper_boundary

number

The upper boundary used to calculate the upper boundary limit. The requirements for this field depend on which `test` is selected.


window

integer

The window of time for samples used to perform the test, in seconds. Samples outside of this window will be omitted.

PUT

/v0/projects/{project}/thresholds/{threshold}

Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher threshold update PROJECT THRESHOLD

View OpenAPI Spec

Delete a threshold


⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.

Delete a threshold for a project. The user must have `delete` permissions for the project. A thresholds must be deleted before its branch, testbed, or measure can be deleted.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Required

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


project

string

Required

The slug or UUID for a project.


threshold

string

Required

The UUID for a threshold.

DELETE

/v0/projects/{project}/thresholds/{threshold}

Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher threshold delete PROJECT THRESHOLD

View OpenAPI Spec


Published: Mon, February 12, 2024 at 7:26:00 AM UTC | Last Updated: Wed, April 3, 2024 at 11:23:00 AM UTC