Skip to main content

Documentation Index

Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Applies to:
  • Plan -
  • Deployment -

Summary

You can duplicate views across projects using the Braintrust API. This is useful for programmatic or bulk operations.
You can also duplicate views directly from the Monitor page UI. See Duplicate views across projects for details.
Features: Views API, monitor custom charts, logs/experiment/dataset table views. To copy a view with the API, export its configuration via the List Views API and recreate it in the destination project via the Create View API.

View type reference

Different view types require different object_type and object_id values. Use this table to determine the correct parameters for the view you want to duplicate.
Viewobject_typeobject_idview_type
Monitor custom chartsorg_projectyour org IDmonitor
Logs tableprojectproject IDlogs
Experiments listprojectproject IDexperiments
Single experiment tableprojectproject IDexperiment
Datasets listprojectproject IDdatasets
Single dataset tableprojectproject IDdataset

Duplicating monitor custom charts

Monitor views are org-scoped, so the object_type is org_project and the object_id is your org ID. The project a monitor view applies to is stored inside options.options.projectId.

Step 1: List monitor views in your org

curl 'https://api.braintrust.dev/v1/view?object_type=org_project&object_id=your-org-id&view_type=monitor' \
  --header 'Authorization: Bearer your-api-key'
# Replace your-org-id with your organization's UUID
Find the view you want to duplicate in the response and copy its view_data and options fields.

Step 2: Create the view for a different project

Post the same view_data and options, but change options.options.projectId to the destination project ID.
curl --request POST \
  --url https://api.braintrust.dev/v1/view \
  --header 'Authorization: Bearer your-api-key' \
  --header 'Content-Type: application/json' \
  --data '{
  "object_type": "org_project",
  "object_id": "your-org-id",
  "view_type": "monitor",
  "name": "My duplicated chart",
  "view_data": {
    "search": {},
    "custom_charts": {}
  },
  "options": {
    "viewType": "monitor",
    "options": {
      "projectId": "destination-project-id",
      "spanType": "range",
      "rangeValue": "14d",
      "type": "project"
    }
  }
}'
# Replace your-org-id, your-api-key, and destination-project-id
# Paste the custom_charts and search values from Step 1 into view_data

Step 3: Verify

Navigate to Monitor in the destination project and confirm the view appears with the correct charts.

Duplicating project-level views (logs, experiments, datasets)

Project-level views use object_type: "project" with the project ID as object_id. To duplicate, list the views in the source project and recreate them in the destination.

Step 1: List views in the source project

Replace your-view-type with the type from the reference table above (e.g., logs, experiments, dataset).
curl 'https://api.braintrust.dev/v1/view?object_type=project&object_id=source-project-id&view_type=your-view-type' \
  --header 'Authorization: Bearer your-api-key'
# Replace source-project-id and your-view-type

Step 2: Create the view in the destination project

Post the same view_data and options, but change object_id to the destination project ID.
curl --request POST \
  --url https://api.braintrust.dev/v1/view \
  --header 'Authorization: Bearer your-api-key' \
  --header 'Content-Type: application/json' \
  --data '{
  "object_type": "project",
  "object_id": "destination-project-id",
  "view_type": "logs",
  "name": "My duplicated view",
  "view_data": {},
  "options": {}
}'
# Replace destination-project-id and your-api-key
# Paste the view_data and options values from Step 1

Step 3: Verify

Navigate to the destination project and confirm the view appears with the correct configuration.