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
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
integerLimit 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
stringName of the env_var to search for
object_type
stringThe type of the object the environment variable is scoped for
"organization" | "project" | "function"
object_id
stringThe id of the object the environment variable is scoped for
"uuid"
Returns a list of env_var objects
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
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
The type of the object the environment variable is scoped for
"organization" | "project" | "function"
object_id
The id of the object the environment variable is scoped for
"uuid"
name
The name of the environment variable
value
stringThe value of the environment variable. Will be encrypted at rest.
Returns the new env_var object
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
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
The type of the object the environment variable is scoped for
"organization" | "project" | "function"
object_id
The id of the object the environment variable is scoped for
"uuid"
name
The name of the environment variable
value
stringThe value of the environment variable. Will be encrypted at rest.
Returns the new env_var object
Get env_var
Get an env_var object by its id
Authorization
Authorization
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
EnvVar id
"uuid"
Returns the env_var object
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
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
The name of the environment variable
value
stringThe value of the environment variable. Will be encrypted at rest.
Path Parameters
env_var_id
EnvVar id
"uuid"
Returns the env_var object
Delete env_var
Delete an env_var object by its id
Authorization
Authorization
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
EnvVar id
"uuid"
Returns the deleted env_var object