CustomColumns

Create or replace custom column

Changed on

Create or replace a custom column. If there is an existing custom column with the same name in the same scope, will replace its expression. Requires update permission on the scoping object.

Custom columns are scoped to a specific table by the combination of object_type, object_id, subtype, and variant. Use the same scope when creating and listing columns. Use these combinations to display columns in the corresponding UI table:

Pageobject_typeobject_idsubtypevariant
DatasetdatasetDataset ID""dataset
Project logsprojectProject IDproject_logproject_log
Experiment detailsprojectProject IDexperimentexperiment
Experiments listprojectProject IDexperimentexperiment_list

Experiment span columns apply across experiments in the project.

put/v1/column

Request

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

Request body

object_type'organization' | 'project' | 'experiment' | 'dataset' | 'prompt' | 'prompt_session' | 'group' | 'role' | 'org_member' | 'project_log' | 'org_project' | 'org_audit_logs' | 'project_group' | 'project_group_projects' | 'ai_secret' | 'org_ai_secret' | 'org_account' required

The type of the object the custom column is scoped to, usually project

object_idstring uuid required

The ID of the scoping object. Use the project ID for project logs, experiment spans, and the experiments list. Use the dataset ID for dataset rows

variant'project' | 'experiment' | 'dataset' | 'project_log' | 'experiment_list'

The table variant the custom column applies to. If omitted, defaults to the nonempty subtype, or otherwise to object_type. Set experiment_list explicitly to target the experiments list instead of experiment details. Use the same scope when creating and listing columns

namestring required

The name of the custom column

exprstring required

The expression used to extract the value for the custom column

Response

Returns the new custom column object

idstring uuid required

Unique identifier for the custom columns

object_type'organization' | 'project' | 'experiment' | 'dataset' | 'prompt' | 'prompt_session' | 'group' | 'role' | 'org_member' | 'project_log' | 'org_project' | 'org_audit_logs' | 'project_group' | 'project_group_projects' | 'ai_secret' | 'org_ai_secret' | 'org_account' required

The object type that the ACL applies to

object_idstring uuid required

The id of the object the custom column is scoped for

variant'project' | 'experiment' | 'dataset' | 'project_log' | 'experiment_list' required

The table variant that the custom column applies to

namestring required

The name of the custom column

exprstring required

The expression used to extract the value for the custom column

createdstring date-time nullable

Date of custom columns creation

Changes