EnvVars

Get an env var object by its id

get/v1/env_var/{env_var_id}

Request

  • Base URL
    https://api.braintrust.dev
  • Auth
    • HTTP bearer
    • or none

Path parameters

env_var_idstring uuid required

EnvVar id

Response

Returns the env var object

idstring uuid required

Unique identifier for the environment variable

object_type'organization' | 'project' | 'function' | 'mcp_server' required

The type of the object the environment variable is scoped for

object_idstring uuid required

The id of the object the environment variable is scoped for

namestring required

The name of the environment variable

createdstring date-time nullable

Date of environment variable creation

secret_updated_atstring date-time nullable

Date of last update to the encrypted secret value itself

secret_updated_by_user_idstring uuid nullable

User id of the last update to the encrypted secret value

usedstring date-time nullable

Date the environment variable was last used

metadataobject nullable

Optional metadata associated with the environment variable when managed via the function secrets API

preview_secretstring nullable

Redacted preview of the stored secret value

secret_typestring nullable

Optional classification for the secret (for example, the AI provider name)

secret_category'env_var' | 'ai_provider' | 'sandbox_provider' | 'automation_integration'

The category of the secret: env_var for regular environment variables, ai_provider for AI provider API keys

Changes

    • warning

      added the new automation_integration enum value to the response property for the response status

    • warning

      added the new mcp_server enum value to the response property for the response status