Skip to main content
POST
/
v1
/
deployments
/
{deploymentId}
/
workbooks
/
{workbookId}
/
duplicate
Clone a workbook
curl --request POST \
  --url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}/duplicate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "shared": true
}'
{
  "calculatedFields": {},
  "createdAt": "2023-12-25",
  "deploymentId": 123,
  "id": 123,
  "meta": {},
  "name": "<string>",
  "updatedAt": "2023-12-25",
  "createdBy": 123,
  "dashboardDraft": {
    "description": "<string>",
    "layout": {
      "breakpoints": {
        "lg": 123,
        "md": 123,
        "sm": 123,
        "xs": 123,
        "xxs": 123
      },
      "cols": {
        "lg": 123,
        "md": 123,
        "sm": 123,
        "xs": 123,
        "xxs": 123
      },
      "containerPadding": [
        123
      ],
      "margin": [
        123
      ],
      "rowHeight": 123
    },
    "settings": {},
    "theme": {},
    "title": "<string>",
    "widgets": [
      {
        "id": "<string>",
        "position": {
          "h": 123,
          "w": 123,
          "x": 123,
          "y": 123
        },
        "config": {},
        "responsiveLayouts": {
          "lg": {
            "h": 123,
            "w": 123,
            "x": 123,
            "y": 123
          },
          "md": {
            "h": 123,
            "w": 123,
            "x": 123,
            "y": 123
          },
          "sm": {
            "h": 123,
            "w": 123,
            "x": 123,
            "y": 123
          },
          "xs": {
            "h": 123,
            "w": 123,
            "x": 123,
            "y": 123
          },
          "xxs": {
            "h": 123,
            "w": 123,
            "x": 123,
            "y": 123
          }
        },
        "style": {}
      }
    ]
  },
  "dashboardPublished": {
    "description": "<string>",
    "layout": {
      "breakpoints": {
        "lg": 123,
        "md": 123,
        "sm": 123,
        "xs": 123,
        "xxs": 123
      },
      "cols": {
        "lg": 123,
        "md": 123,
        "sm": 123,
        "xs": 123,
        "xxs": 123
      },
      "containerPadding": [
        123
      ],
      "margin": [
        123
      ],
      "rowHeight": 123
    },
    "settings": {},
    "theme": {},
    "title": "<string>",
    "widgets": [
      {
        "id": "<string>",
        "position": {
          "h": 123,
          "w": 123,
          "x": 123,
          "y": 123
        },
        "config": {},
        "responsiveLayouts": {
          "lg": {
            "h": 123,
            "w": 123,
            "x": 123,
            "y": 123
          },
          "md": {
            "h": 123,
            "w": 123,
            "x": 123,
            "y": 123
          },
          "sm": {
            "h": 123,
            "w": 123,
            "x": 123,
            "y": 123
          },
          "xs": {
            "h": 123,
            "w": 123,
            "x": 123,
            "y": 123
          },
          "xxs": {
            "h": 123,
            "w": 123,
            "x": 123,
            "y": 123
          }
        },
        "style": {}
      }
    ]
  },
  "folderId": 123,
  "isFavorite": true,
  "publishedDashboard": {
    "allowEmbed": true,
    "config": {
      "description": "<string>",
      "layout": {
        "breakpoints": {
          "lg": 123,
          "md": 123,
          "sm": 123,
          "xs": 123,
          "xxs": 123
        },
        "cols": {
          "lg": 123,
          "md": 123,
          "sm": 123,
          "xs": 123,
          "xxs": 123
        },
        "containerPadding": [
          123
        ],
        "margin": [
          123
        ],
        "rowHeight": 123
      },
      "settings": {},
      "theme": {},
      "title": "<string>",
      "widgets": [
        {
          "id": "<string>",
          "position": {
            "h": 123,
            "w": 123,
            "x": 123,
            "y": 123
          },
          "config": {},
          "responsiveLayouts": {
            "lg": {
              "h": 123,
              "w": 123,
              "x": 123,
              "y": 123
            },
            "md": {
              "h": 123,
              "w": 123,
              "x": 123,
              "y": 123
            },
            "sm": {
              "h": 123,
              "w": 123,
              "x": 123,
              "y": 123
            },
            "xs": {
              "h": 123,
              "w": 123,
              "x": 123,
              "y": 123
            },
            "xxs": {
              "h": 123,
              "w": 123,
              "x": 123,
              "y": 123
            }
          },
          "style": {}
        }
      ]
    },
    "deploymentId": 123,
    "id": 123,
    "publicId": "<string>",
    "reportSnapshots": [
      {
        "id": 123,
        "reportId": 123,
        "versionNumber": 123,
        "description": "<string>",
        "meta": {},
        "name": "<string>",
        "preferences": {
          "columnFormats": {}
        },
        "spec": "<string>",
        "sqlQuery": "<string>",
        "title": "<string>"
      }
    ],
    "versionId": 123,
    "versionNumber": 123,
    "workbookId": 123,
    "createdBy": 123,
    "description": "<string>",
    "fromSharedWorkspace": true,
    "title": "<string>"
  },
  "user": {
    "email": "<string>",
    "id": 123,
    "firstName": "<string>",
    "picture": "<string>"
  },
  "userId": 123
}
Create a full copy of a workbook, including its reports and its published dashboard, and return the new workbook. The clone is created in the same folder as the source and named “Copy of {original name}”. All report references inside the dashboard (and the dashboard draft) are re-pointed at the copied reports, so the duplicate is fully self-contained and independent of the original. Per-user view history (last-viewed timestamps) is not carried over. Requires read access to the source workbook and the AI BI User role (or higher). The new workbook is owned by the calling user. Creator-mode embed sessions can also clone a workbook from the shared workspace (the items listed by GET /shared-workspace) by passing { "shared": true } in the request body — workbookId is then resolved against the shared workspace instead of the caller’s own. Such a clone is built from the workbook’s published dashboard: a fresh report is created per report snapshot, the dashboard is re-published onto the new workbook, and the same config seeds the workbook’s draft — the source’s live reports and unpublished draft are not copied. The clone is placed at the workspace root. Requires the workbook to have a published dashboard (400 otherwise); 403 for non-creator-mode callers. If the deployment’s plan enforces a workbook limit and it has been reached, the request is rejected with 400. Returns 404 if the workbook does not exist or belongs to a different deployment.

Authorizations

Authorization
string
header
required

Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.

Path Parameters

deploymentId
number
required
workbookId
number
required

Body

application/json

DuplicateWorkbookInput

shared
boolean | null

Response

200 - application/json
calculatedFields
object
required
createdAt
required
deploymentId
integer
required
id
integer
required
meta
object
required
name
string
required
type
enum<string>
required
Available options:
FOLDER,
WORKBOOK,
REPORT
updatedAt
required
createdBy
integer
dashboardDraft
object
dashboardPublished
object
folderId
number | null
isFavorite
boolean | null
publishedDashboard
object
user
object
userId
number | null