Server REST API


View server version


⚠️ 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 the API server version. This is used to verify that the CLI and API server are compatible. It can also be used as a simple endpoint to verify that the server is running.

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.

GET

/v0/server/version

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

Bencher CLI

bencher server version

View OpenAPI Spec

View server OpenAPI specification


⚠️ 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 the API server OpenAPI specification. The OpenAPI specification can be used to generate API client code.

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.

GET

/v0/server/spec

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

Bencher CLI

bencher server spec

View OpenAPI Spec

Restart server


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

Restart the API server. The user must be an admin on the server to use this route.

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.

Body Parameters


delay

integer

The delay in seconds before the server restarts. Defaults to 3 seconds, if not specified.

Default: 3

POST

/v0/server/restart

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

Bencher CLI

bencher server restart

View OpenAPI Spec

Backup server


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

Backup the API server database to blob storage. The user must be an admin on the server to use this route.

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.

Body Parameters


compress

boolean


data_store

string

One of: aws_s3


rm

boolean

POST

/v0/server/backup

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

Bencher CLI

bencher server backup

View OpenAPI Spec

View server stats


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

➕ Bencher Plus: View the API server stats. The user must be an admin on the server to use this route.

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.

GET

/v0/server/stats

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

Bencher CLI

bencher server stats

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