v1
/env_var
List env_vars
List out all env_vars. The env_vars are sorted by creation date, with the most recently-created env_vars coming first
Authorization
Authorization
RequiredBearer <token>
Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key]
to your HTTP request. You can create an API key in the Braintrust organization settings page.
In: header
Query Parameters
limit
integer | null
Limit the number of objects to return
0
ids
Any properties in string, array<string>
Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times
env_var_name
string
Name of the env_var to search for
object_type
string
The type of the object the environment variable is scoped for
"organization" | "project" | "function"
object_id
string
The id of the object the environment variable is scoped for
"uuid"
Returns a list of env_var objects
v1
/env_var
Create env_var
Create a new env_var. If there is an existing env_var with the same name as the one specified in the request, will return the existing env_var unmodified
Authorization
Authorization
RequiredBearer <token>
Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key]
to your HTTP request. You can create an API key in the Braintrust organization settings page.
In: header
Request Body
application/json
OptionalAny desired information about the new env_var object
object_type
Requiredstring
The type of the object the environment variable is scoped for
"organization" | "project" | "function"
object_id
Requiredstring
The id of the object the environment variable is scoped for
"uuid"
name
Requiredstring
The name of the environment variable
value
string | null
The value of the environment variable. Will be encrypted at rest.
Returns the new env_var object
v1
/env_var
Create or replace env_var
Create or replace env_var. If there is an existing env_var with the same name as the one specified in the request, will replace the existing env_var with the provided fields
Authorization
Authorization
RequiredBearer <token>
Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key]
to your HTTP request. You can create an API key in the Braintrust organization settings page.
In: header
Request Body
application/json
OptionalAny desired information about the new env_var object
object_type
Requiredstring
The type of the object the environment variable is scoped for
"organization" | "project" | "function"
object_id
Requiredstring
The id of the object the environment variable is scoped for
"uuid"
name
Requiredstring
The name of the environment variable
value
string | null
The value of the environment variable. Will be encrypted at rest.
Returns the new env_var object
v1
/env_var
/{env_var_id}
Get env_var
Get an env_var object by its id
Authorization
Authorization
RequiredBearer <token>
Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key]
to your HTTP request. You can create an API key in the Braintrust organization settings page.
In: header
Path Parameters
env_var_id
Requiredstring
EnvVar id
"uuid"
Returns the env_var object
v1
/env_var
/{env_var_id}
Partially update env_var
Partially update an env_var object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.
Authorization
Authorization
RequiredBearer <token>
Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key]
to your HTTP request. You can create an API key in the Braintrust organization settings page.
In: header
Request Body
application/json
OptionalFields to update
name
Requiredstring
The name of the environment variable
value
string | null
The value of the environment variable. Will be encrypted at rest.
Path Parameters
env_var_id
Requiredstring
EnvVar id
"uuid"
Returns the env_var object
v1
/env_var
/{env_var_id}
Delete env_var
Delete an env_var object by its id
Authorization
Authorization
RequiredBearer <token>
Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key]
to your HTTP request. You can create an API key in the Braintrust organization settings page.
In: header
Path Parameters
env_var_id
Requiredstring
EnvVar id
"uuid"
Returns the deleted env_var object