Project Benchmarks REST API


List benchmarks 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 benchmarks 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 benchmarks are sorted in alphabetical order by name. The HTTP response header `X-Total-Count` contains the total number of benchmarks.

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.

Default: name

One of: name


archived

boolean

If set to `true`, only returns archived benchmarks. If not set or set to `false`, only returns non-archived benchmarks.


name

string

Filter by benchmark name, exact match.


search

string

Search by benchmark name, slug, or UUID.

GET
/v0/projects/{project}/benchmarks
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher benchmark list PROJECT

View OpenAPI Spec

Create a benchmark


⚠️ 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 benchmark for a project. The user must have `create` permissions for the project.

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


name

string

Required

The name of the benchmark. Maximum length is 1,024 characters.


slug

string

The preferred slug for the benchmark. If not provided, the slug will be generated from the name. If the provided or generated slug is already in use, a unique slug will be generated. Maximum length is 64 characters.

POST
/v0/projects/{project}/benchmarks
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher benchmark create PROJECT

View OpenAPI Spec

View a benchmark


⚠️ 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 benchmark 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


benchmark

string

Required

The slug or UUID for a benchmark.


project

string

Required

The slug or UUID for a project.

GET
/v0/projects/{project}/benchmarks/{benchmark}
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher benchmark view PROJECT BENCHMARK

View OpenAPI Spec

Update a benchmark


⚠️ 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 benchmark for a project. The user must have `edit` permissions for the project.

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


benchmark

string

Required

The slug or UUID for a benchmark.


project

string

Required

The slug or UUID for a project.

Body Parameters


archived

boolean

Set whether the benchmark is archived.


name

string

The new name of the benchmark. Maximum length is 1,024 characters.


slug

string

The preferred new slug for the benchmark. Maximum length is 64 characters.

PATCH
/v0/projects/{project}/benchmarks/{benchmark}
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher benchmark update PROJECT BENCHMARK

View OpenAPI Spec

Delete a benchmark


⚠️ 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 benchmark for a project. The user must have `delete` permissions for the project. All reports that use this benchmark must be deleted first!

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


benchmark

string

Required

The slug or UUID for a benchmark.


project

string

Required

The slug or UUID for a project.

DELETE
/v0/projects/{project}/benchmarks/{benchmark}
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher benchmark delete PROJECT BENCHMARK

View OpenAPI Spec


Published: Mon, February 12, 2024 at 7:26:00 AM UTC | Last Updated: Fri, June 21, 2024 at 5:47:00 PM UTC