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. The HTTP response header `X-Total-Count` contains the total number of thresholds.
Headers
Content-Type string
Set to application/json.
Authorization string
Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.
Path Parameters
projectThe slug or UUID for a project.
Query Parameters
directionstring
The direction to sort by. If not specified, the default sort direction is used.
Default: asc
One of: asc, desc
pageinteger
The page number to return. If not specified, the first page is returned.
Default: 1
per_pageinteger
The number of items to return per page. If not specified, the default number of items per page (8) is used.
Default: 8
sortstring
The field to sort by. If not specified, the default sort field is used.
One of: created, modified
archivedboolean
If set to `true`, only return thresholds with an archived branch, testbed, or measure. If not set or set to `false`, only returns thresholds with non-archived branches, testbeds, and measures.
branchstring
Filter by branch name, exact match.
measurestring
Filter by measure name, exact match.
testbedstring
Filter by testbed name, exact match.
/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
Set to application/json.
Authorization string
Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.
Path Parameters
projectThe slug or UUID for a project.
Body Parameters
branchstring
The UUID, slug, or name of the threshold branch.
lower_boundarynumber
The lower boundary used to calculate the lower boundary limit. The requirements for this field depend on which `test` is selected.
max_sample_sizeinteger
The maximum number of samples used to perform the test. Only the most recent samples will be used if there are more.
measurestring
The UUID, slug, or name of the threshold measure.
min_sample_sizeinteger
The minimum number of samples required to perform the test. If there are fewer samples, the test will not be performed.
teststring
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
testbedstring
The UUID, slug, or name of the threshold testbed.
upper_boundarynumber
The upper boundary used to calculate the upper boundary limit. The requirements for this field depend on which `test` is selected.
windowinteger
The window of time for samples used to perform the test, in seconds. Samples outside of this window will be omitted.
/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
Set to application/json.
Authorization string
Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.
Path Parameters
projectThe slug or UUID for a project.
thresholdstring
The UUID for a threshold.
Query Parameters
modelstring
View the threshold with the specified model UUID. This can be used to view a threshold with a historical model that has since been replaced by a new model. If not specified, then the current model is used.
/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
Set to application/json.
Authorization string
Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.
Path Parameters
projectThe slug or UUID for a project.
thresholdstring
The UUID for a threshold.
Body Parameters
/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
Set to application/json.
Authorization string
Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.
Path Parameters
projectThe slug or UUID for a project.
thresholdstring
The UUID for a threshold.
/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