Create custom column
Create a new custom column. If there is an existing custom column with the same name in the same scope, will return the existing custom column unmodified. 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:
| Page | object_type | object_id | subtype | variant |
|---|---|---|---|---|
| Dataset | dataset | Dataset ID | "" | dataset |
| Project logs | project | Project ID | project_log | project_log |
| Experiment details | project | Project ID | experiment | experiment |
| Experiments list | project | Project ID | experiment | experiment_list |
Experiment span columns apply across experiments in the project.
Authorizations
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.
Body
The type of the object the custom column is scoped to, usually project
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 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
The child object type the custom column applies to, such as experiment or project_log. Use an empty string when the column applies directly to the scoping object, such as a dataset
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 The name of the custom column
The expression used to extract the value for the custom column
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
project, experiment, dataset, project_log, experiment_list Response
Returns the new custom column object
Unique identifier for the custom columns
The object type that the ACL applies to
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 The id of the object the custom column is scoped for
The object type that the ACL applies to
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 The table variant that the custom column applies to
project, experiment, dataset, project_log, experiment_list The name of the custom column
The expression used to extract the value for the custom column
Date of custom columns creation