Organizations REST API


List organizations


⚠️ 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 organizations where the user is a member. The user must have `view` permissions for each organization. By default, the organizations are sorted in alphabetical order by name. The HTTP response header `X-Total-Count` contains the total number of organizations.

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.

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


name

string

Filter by organization name, exact match.


search

string

Search by organization name, slug, or UUID.

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

Bencher CLI

bencher organization list

View OpenAPI Spec

Create an organization


⚠️ 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 new organization. The user must be authenticated to use this route. ➕ Bencher Plus: This route can be limited to admins on self-hosted instances.

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


name

string

Required

The name of the organization. Maximum length is 64 characters.


slug

string

The preferred slug for the organization. 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/organizations
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher organization create

View OpenAPI Spec

View an organization


⚠️ 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 an organization where the user is a member. The user must have `view` permissions for the organization.

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


organization

string

Required

The slug or UUID for an organization.

GET
/v0/organizations/{organization}
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher organization view ORGANIZATION

View OpenAPI Spec

Update an organization


⚠️ 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 an organization where the user is a member. The user must have `edit` permissions for the organization. If updating the license, the user must have `manage` permissions for the organization.

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


organization

string

Required

The slug or UUID for an organization.

Body Parameters


license

string

➕ Bencher Plus: The new license for the organization. Set to `null` to remove the current license.


name

string

The new name of the organization. Maximum length is 64 characters.


slug

string

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

PATCH
/v0/organizations/{organization}
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher organization update ORGANIZATION

View OpenAPI Spec

Delete an organization


⚠️ 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 an organization where the user is a member. The user must have `delete` permissions for the organization.

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


organization

string

Required

The slug or UUID for an organization.

DELETE
/v0/organizations/{organization}
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher organization delete ORGANIZATION

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