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
Set to application/json.
Authorization string
Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.
/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
Set to application/json.
Authorization string
Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.
/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
Set to application/json.
Authorization string
Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.
Body Parameters
delayinteger
The delay in seconds before the server restarts. Defaults to 3 seconds, if not specified.
Default: 3
/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. The user must be an admin on the server to use this route.
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.
Body Parameters
compressboolean
Compress the database backup with gzip. This operation runs first.
data_storestring
Save the database backup to this data store. This operation runs second.
The database.data_store section of the API server configuration must be configured for this data store.
One of: aws_s3
rmboolean
Remove the local copy of the database backup. This operation runs third.
/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
Set to application/json.
Authorization string
Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.
/v0/server/stats | Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:61016 |
Bencher CLI
bencher server stats View OpenAPI Spec