Move workspace items in bulk
curl --request POST \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": 123
}
],
"folderId": 123
}
'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move"
payload = {
"items": [{ "id": 123 }],
"folderId": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{id: 123}], folderId: 123})
};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'id' => 123
]
],
'folderId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move"
payload := strings.NewReader("{\n \"items\": [\n {\n \"id\": 123\n }\n ],\n \"folderId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"id\": 123\n }\n ],\n \"folderId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"id\": 123\n }\n ],\n \"folderId\": 123\n}"
response = http.request(request)
puts response.read_body{
"failed": [
{
"error": {
"message": "<string>",
"status": 123
},
"id": 123,
"type": "FOLDER"
}
],
"moved": [
{
"calculatedFields": {},
"createdAt": "2023-12-25",
"deploymentId": 123,
"id": 123,
"meta": {},
"name": "<string>",
"type": "FOLDER",
"updatedAt": "2023-12-25",
"createdBy": 123,
"dashboardDraft": {
"app": {
"entry": "<string>",
"files": {},
"html": "<string>",
"manifest": {
"dependencies": {},
"version": 123
}
},
"description": "<string>",
"kind": "CLASSIC",
"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
},
"type": "CHART",
"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": {
"app": {
"entry": "<string>",
"files": {},
"html": "<string>",
"manifest": {
"dependencies": {},
"version": 123
}
},
"description": "<string>",
"kind": "CLASSIC",
"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
},
"type": "CHART",
"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,
"folderPath": [
{
"id": 123,
"name": "<string>"
}
],
"isFavorite": true,
"promotion": {
"linkId": 123,
"origin": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
},
"parent": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
},
"firstPromotion": {
"completedAt": "2023-12-25",
"destinationChangedSincePreview": true,
"destinationWasDiverged": true,
"id": 123,
"linkId": 123,
"outcome": "created",
"overrideRequested": true,
"performedBy": {
"authenticationMethod": "session",
"displayName": "<string>",
"userId": 123,
"apiKeyId": 123
},
"targetDashboardVersionId": 123,
"source": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
},
"target": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
}
},
"lastPromotion": {
"completedAt": "2023-12-25",
"destinationChangedSincePreview": true,
"destinationWasDiverged": true,
"id": 123,
"linkId": 123,
"outcome": "created",
"overrideRequested": true,
"performedBy": {
"authenticationMethod": "session",
"displayName": "<string>",
"userId": 123,
"apiKeyId": 123
},
"targetDashboardVersionId": 123,
"source": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
},
"target": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
}
}
},
"publishedDashboard": {
"allowEmbed": true,
"config": {
"app": {
"entry": "<string>",
"files": {},
"html": "<string>",
"manifest": {
"dependencies": {},
"version": 123
}
},
"description": "<string>",
"kind": "CLASSIC",
"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
},
"type": "CHART",
"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>",
"fillMissingRows": {
"member": "<string>",
"excludedDimensions": [
"<string>"
]
},
"isSourceReport": true,
"kind": "vega",
"meta": {},
"name": "<string>",
"periodComparisons": [
{
"measure": "<string>",
"offset": {
"amount": 123,
"unit": "<string>"
},
"timeDimension": "<string>",
"outputs": [
"<string>"
]
}
],
"preferences": {
"columnFormats": {}
},
"publicId": "<string>",
"pythonCode": "<string>",
"spec": "<string>",
"sqlQuery": "<string>",
"title": "<string>"
}
],
"status": "draft",
"versionId": 123,
"versionNumber": 123,
"workbookId": 123,
"createdBy": 123,
"description": "<string>",
"fromSharedWorkspace": true,
"restrictDataDownload": true,
"title": "<string>",
"useBoardDashboards": true
},
"slug": "<string>",
"user": {
"email": "<string>",
"id": 123,
"firstName": "<string>",
"picture": "<string>"
},
"userId": 123
}
]
}Workspace
Move workspace items in bulk
POST
/
api
/
v1
/
deployments
/
{deploymentId}
/
workspace
/
bulk-move
Move workspace items in bulk
curl --request POST \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": 123
}
],
"folderId": 123
}
'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move"
payload = {
"items": [{ "id": 123 }],
"folderId": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{id: 123}], folderId: 123})
};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'id' => 123
]
],
'folderId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move"
payload := strings.NewReader("{\n \"items\": [\n {\n \"id\": 123\n }\n ],\n \"folderId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"id\": 123\n }\n ],\n \"folderId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workspace/bulk-move")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"id\": 123\n }\n ],\n \"folderId\": 123\n}"
response = http.request(request)
puts response.read_body{
"failed": [
{
"error": {
"message": "<string>",
"status": 123
},
"id": 123,
"type": "FOLDER"
}
],
"moved": [
{
"calculatedFields": {},
"createdAt": "2023-12-25",
"deploymentId": 123,
"id": 123,
"meta": {},
"name": "<string>",
"type": "FOLDER",
"updatedAt": "2023-12-25",
"createdBy": 123,
"dashboardDraft": {
"app": {
"entry": "<string>",
"files": {},
"html": "<string>",
"manifest": {
"dependencies": {},
"version": 123
}
},
"description": "<string>",
"kind": "CLASSIC",
"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
},
"type": "CHART",
"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": {
"app": {
"entry": "<string>",
"files": {},
"html": "<string>",
"manifest": {
"dependencies": {},
"version": 123
}
},
"description": "<string>",
"kind": "CLASSIC",
"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
},
"type": "CHART",
"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,
"folderPath": [
{
"id": 123,
"name": "<string>"
}
],
"isFavorite": true,
"promotion": {
"linkId": 123,
"origin": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
},
"parent": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
},
"firstPromotion": {
"completedAt": "2023-12-25",
"destinationChangedSincePreview": true,
"destinationWasDiverged": true,
"id": 123,
"linkId": 123,
"outcome": "created",
"overrideRequested": true,
"performedBy": {
"authenticationMethod": "session",
"displayName": "<string>",
"userId": 123,
"apiKeyId": 123
},
"targetDashboardVersionId": 123,
"source": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
},
"target": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
}
},
"lastPromotion": {
"completedAt": "2023-12-25",
"destinationChangedSincePreview": true,
"destinationWasDiverged": true,
"id": 123,
"linkId": 123,
"outcome": "created",
"overrideRequested": true,
"performedBy": {
"authenticationMethod": "session",
"displayName": "<string>",
"userId": 123,
"apiKeyId": 123
},
"targetDashboardVersionId": 123,
"source": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
},
"target": {
"availability": "available",
"deploymentId": 123,
"name": "<string>",
"workbookId": 123
}
}
},
"publishedDashboard": {
"allowEmbed": true,
"config": {
"app": {
"entry": "<string>",
"files": {},
"html": "<string>",
"manifest": {
"dependencies": {},
"version": 123
}
},
"description": "<string>",
"kind": "CLASSIC",
"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
},
"type": "CHART",
"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>",
"fillMissingRows": {
"member": "<string>",
"excludedDimensions": [
"<string>"
]
},
"isSourceReport": true,
"kind": "vega",
"meta": {},
"name": "<string>",
"periodComparisons": [
{
"measure": "<string>",
"offset": {
"amount": 123,
"unit": "<string>"
},
"timeDimension": "<string>",
"outputs": [
"<string>"
]
}
],
"preferences": {
"columnFormats": {}
},
"publicId": "<string>",
"pythonCode": "<string>",
"spec": "<string>",
"sqlQuery": "<string>",
"title": "<string>"
}
],
"status": "draft",
"versionId": 123,
"versionNumber": 123,
"workbookId": 123,
"createdBy": 123,
"description": "<string>",
"fromSharedWorkspace": true,
"restrictDataDownload": true,
"title": "<string>",
"useBoardDashboards": true
},
"slug": "<string>",
"user": {
"email": "<string>",
"id": 123,
"firstName": "<string>",
"picture": "<string>"
},
"userId": 123
}
]
}Move up to 100 workspace items — workbooks, reports, and folders, mixed freely — into one destination folder in a single request.
Request body:
items— the items to move, each{ type, id }withtypeone ofWORKBOOK,REPORT,FOLDER. Repeated references to the same item are collapsed, so the response holds exactly one entry per distinct item requested.folderId— the destination folder id for the whole batch, ornullto move the items to the workspace root. For a folder item this becomes its new parent.
200 whenever the request itself is well formed, and reports each item’s outcome separately:
moved— the items that were moved, serialized exactly asPOST /workspace/movereturns them.failed— the items that were not moved, each with the(type, id)requested and anerrorcarrying thestatusandmessagethe single-item move would have returned for it (403when the caller lacks access,404when the item does not exist or belongs to another deployment,400for an invalid move such as a folder into its own descendant).
failed array means the whole batch applied. Items are applied one at a time in the order given, each in its own transaction, so earlier moves are not rolled back when a later item fails — the response is the record of what was applied.
Access is checked per item with the same rules as the single-item move, so a batch mixing items the caller may and may not move applies the permitted ones and reports the rest.Authorizations
Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.
Path Parameters
Body
application/json
BulkMoveWorkspaceObjectsInput