Update a workbook
curl --request PUT \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folderId": 123,
"meta": {},
"name": "<string>",
"renamed": true,
"slug": "<string>",
"slugTakeover": true
}
'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}"
payload = {
"folderId": 123,
"meta": {},
"name": "<string>",
"renamed": True,
"slug": "<string>",
"slugTakeover": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
folderId: 123,
meta: {},
name: '<string>',
renamed: true,
slug: '<string>',
slugTakeover: true
})
};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}', 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}/workbooks/{workbookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'folderId' => 123,
'meta' => [
],
'name' => '<string>',
'renamed' => true,
'slug' => '<string>',
'slugTakeover' => true
]),
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}/workbooks/{workbookId}"
payload := strings.NewReader("{\n \"folderId\": 123,\n \"meta\": {},\n \"name\": \"<string>\",\n \"renamed\": true,\n \"slug\": \"<string>\",\n \"slugTakeover\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"folderId\": 123,\n \"meta\": {},\n \"name\": \"<string>\",\n \"renamed\": true,\n \"slug\": \"<string>\",\n \"slugTakeover\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"folderId\": 123,\n \"meta\": {},\n \"name\": \"<string>\",\n \"renamed\": true,\n \"slug\": \"<string>\",\n \"slugTakeover\": true\n}"
response = http.request(request)
puts response.read_bodyWorkbooks
Update a workbook
PUT
/
api
/
v1
/
deployments
/
{deploymentId}
/
workbooks
/
{workbookId}
Update a workbook
curl --request PUT \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folderId": 123,
"meta": {},
"name": "<string>",
"renamed": true,
"slug": "<string>",
"slugTakeover": true
}
'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}"
payload = {
"folderId": 123,
"meta": {},
"name": "<string>",
"renamed": True,
"slug": "<string>",
"slugTakeover": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
folderId: 123,
meta: {},
name: '<string>',
renamed: true,
slug: '<string>',
slugTakeover: true
})
};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}', 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}/workbooks/{workbookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'folderId' => 123,
'meta' => [
],
'name' => '<string>',
'renamed' => true,
'slug' => '<string>',
'slugTakeover' => true
]),
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}/workbooks/{workbookId}"
payload := strings.NewReader("{\n \"folderId\": 123,\n \"meta\": {},\n \"name\": \"<string>\",\n \"renamed\": true,\n \"slug\": \"<string>\",\n \"slugTakeover\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"folderId\": 123,\n \"meta\": {},\n \"name\": \"<string>\",\n \"renamed\": true,\n \"slug\": \"<string>\",\n \"slugTakeover\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"folderId\": 123,\n \"meta\": {},\n \"name\": \"<string>\",\n \"renamed\": true,\n \"slug\": \"<string>\",\n \"slugTakeover\": true\n}"
response = http.request(request)
puts response.read_bodyUpdate a workbook’s properties. All fields are optional; only the fields you send are changed.
name— rename the workbook.renamed— set totruewhen a person renamed the workbook. A suggested name then stops following the workbook’s content. Without it, anameequal to a name a suggestion replaced is ignored as a stale value.meta— replace the workbook’s metadata object.folderId— move the workbook between folders. Set it to a folder id to move the workbook into that folder, or tonullto move it back to the workspace root.
folderId) requires manage access to the workbook, plus edit access to the destination folder when moving into one.
To move a workbook you can use either this endpoint or the unified POST /workspace/move. Returns 404 if the workbook does not exist or belongs to a different deployment.Authorizations
Body
application/json
UpdateWorkbookInput
Response
200 - application/json
Successful response