Update workbook dashboard
curl --request PUT \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}/dashboard \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dashboardDraft": {
"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": {}
}
],
"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": {
"backgroundColor": "<string>",
"controls": {
"backgroundColor": "<string>",
"border": {
"color": "<string>",
"radius": "<string>",
"style": "<string>",
"width": "<string>"
},
"padding": "<string>",
"title": {
"color": "<string>",
"fontFamily": "<string>",
"fontSize": "<string>",
"fontWeight": "<string>"
}
},
"dashboard": {
"backgroundColor": "<string>",
"padding": "<string>"
},
"fontFamily": "<string>",
"primaryColor": "<string>",
"themeId": "<string>",
"widgets": {
"backgroundColor": "<string>",
"border": {
"color": "<string>",
"radius": "<string>",
"style": "<string>",
"width": "<string>"
},
"margin": "<string>",
"padding": "<string>",
"text": {
"codeFontFamily": "<string>",
"color": "<string>",
"fontFamily": "<string>",
"secondaryColor": "<string>"
},
"title": {
"color": "<string>",
"fontFamily": "<string>",
"fontSize": "<string>",
"fontWeight": "<string>"
}
}
},
"title": "<string>"
}
}
'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}/dashboard"
payload = { "dashboardDraft": {
"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": {}
}
],
"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": {
"backgroundColor": "<string>",
"controls": {
"backgroundColor": "<string>",
"border": {
"color": "<string>",
"radius": "<string>",
"style": "<string>",
"width": "<string>"
},
"padding": "<string>",
"title": {
"color": "<string>",
"fontFamily": "<string>",
"fontSize": "<string>",
"fontWeight": "<string>"
}
},
"dashboard": {
"backgroundColor": "<string>",
"padding": "<string>"
},
"fontFamily": "<string>",
"primaryColor": "<string>",
"themeId": "<string>",
"widgets": {
"backgroundColor": "<string>",
"border": {
"color": "<string>",
"radius": "<string>",
"style": "<string>",
"width": "<string>"
},
"margin": "<string>",
"padding": "<string>",
"text": {
"codeFontFamily": "<string>",
"color": "<string>",
"fontFamily": "<string>",
"secondaryColor": "<string>"
},
"title": {
"color": "<string>",
"fontFamily": "<string>",
"fontSize": "<string>",
"fontWeight": "<string>"
}
}
},
"title": "<string>"
} }
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({
dashboardDraft: {
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: {}
}
],
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: {
backgroundColor: '<string>',
controls: {
backgroundColor: '<string>',
border: {color: '<string>', radius: '<string>', style: '<string>', width: '<string>'},
padding: '<string>',
title: {
color: '<string>',
fontFamily: '<string>',
fontSize: '<string>',
fontWeight: '<string>'
}
},
dashboard: {backgroundColor: '<string>', padding: '<string>'},
fontFamily: '<string>',
primaryColor: '<string>',
themeId: '<string>',
widgets: {
backgroundColor: '<string>',
border: {color: '<string>', radius: '<string>', style: '<string>', width: '<string>'},
margin: '<string>',
padding: '<string>',
text: {
codeFontFamily: '<string>',
color: '<string>',
fontFamily: '<string>',
secondaryColor: '<string>'
},
title: {
color: '<string>',
fontFamily: '<string>',
fontSize: '<string>',
fontWeight: '<string>'
}
}
},
title: '<string>'
}
})
};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}/dashboard', 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}/dashboard",
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([
'dashboardDraft' => [
'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' => [
]
]
],
'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' => [
'backgroundColor' => '<string>',
'controls' => [
'backgroundColor' => '<string>',
'border' => [
'color' => '<string>',
'radius' => '<string>',
'style' => '<string>',
'width' => '<string>'
],
'padding' => '<string>',
'title' => [
'color' => '<string>',
'fontFamily' => '<string>',
'fontSize' => '<string>',
'fontWeight' => '<string>'
]
],
'dashboard' => [
'backgroundColor' => '<string>',
'padding' => '<string>'
],
'fontFamily' => '<string>',
'primaryColor' => '<string>',
'themeId' => '<string>',
'widgets' => [
'backgroundColor' => '<string>',
'border' => [
'color' => '<string>',
'radius' => '<string>',
'style' => '<string>',
'width' => '<string>'
],
'margin' => '<string>',
'padding' => '<string>',
'text' => [
'codeFontFamily' => '<string>',
'color' => '<string>',
'fontFamily' => '<string>',
'secondaryColor' => '<string>'
],
'title' => [
'color' => '<string>',
'fontFamily' => '<string>',
'fontSize' => '<string>',
'fontWeight' => '<string>'
]
]
],
'title' => '<string>'
]
]),
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}/dashboard"
payload := strings.NewReader("{\n \"dashboardDraft\": {\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"position\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"config\": {},\n \"responsiveLayouts\": {\n \"lg\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"md\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"sm\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xxs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n }\n },\n \"style\": {}\n }\n ],\n \"description\": \"<string>\",\n \"layout\": {\n \"breakpoints\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"cols\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"containerPadding\": [\n 123\n ],\n \"margin\": [\n 123\n ],\n \"rowHeight\": 123\n },\n \"settings\": {},\n \"theme\": {\n \"backgroundColor\": \"<string>\",\n \"controls\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"padding\": \"<string>\",\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n },\n \"dashboard\": {\n \"backgroundColor\": \"<string>\",\n \"padding\": \"<string>\"\n },\n \"fontFamily\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"themeId\": \"<string>\",\n \"widgets\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"margin\": \"<string>\",\n \"padding\": \"<string>\",\n \"text\": {\n \"codeFontFamily\": \"<string>\",\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"secondaryColor\": \"<string>\"\n },\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n }\n },\n \"title\": \"<string>\"\n }\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}/dashboard")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dashboardDraft\": {\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"position\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"config\": {},\n \"responsiveLayouts\": {\n \"lg\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"md\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"sm\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xxs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n }\n },\n \"style\": {}\n }\n ],\n \"description\": \"<string>\",\n \"layout\": {\n \"breakpoints\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"cols\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"containerPadding\": [\n 123\n ],\n \"margin\": [\n 123\n ],\n \"rowHeight\": 123\n },\n \"settings\": {},\n \"theme\": {\n \"backgroundColor\": \"<string>\",\n \"controls\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"padding\": \"<string>\",\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n },\n \"dashboard\": {\n \"backgroundColor\": \"<string>\",\n \"padding\": \"<string>\"\n },\n \"fontFamily\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"themeId\": \"<string>\",\n \"widgets\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"margin\": \"<string>\",\n \"padding\": \"<string>\",\n \"text\": {\n \"codeFontFamily\": \"<string>\",\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"secondaryColor\": \"<string>\"\n },\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n }\n },\n \"title\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}/dashboard")
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 \"dashboardDraft\": {\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"position\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"config\": {},\n \"responsiveLayouts\": {\n \"lg\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"md\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"sm\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xxs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n }\n },\n \"style\": {}\n }\n ],\n \"description\": \"<string>\",\n \"layout\": {\n \"breakpoints\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"cols\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"containerPadding\": [\n 123\n ],\n \"margin\": [\n 123\n ],\n \"rowHeight\": 123\n },\n \"settings\": {},\n \"theme\": {\n \"backgroundColor\": \"<string>\",\n \"controls\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"padding\": \"<string>\",\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n },\n \"dashboard\": {\n \"backgroundColor\": \"<string>\",\n \"padding\": \"<string>\"\n },\n \"fontFamily\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"themeId\": \"<string>\",\n \"widgets\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"margin\": \"<string>\",\n \"padding\": \"<string>\",\n \"text\": {\n \"codeFontFamily\": \"<string>\",\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"secondaryColor\": \"<string>\"\n },\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n }\n },\n \"title\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"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": {}
}
]
}
}Workbooks
Update workbook dashboard
PUT
/
v1
/
deployments
/
{deploymentId}
/
workbooks
/
{workbookId}
/
dashboard
Update workbook dashboard
curl --request PUT \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}/dashboard \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dashboardDraft": {
"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": {}
}
],
"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": {
"backgroundColor": "<string>",
"controls": {
"backgroundColor": "<string>",
"border": {
"color": "<string>",
"radius": "<string>",
"style": "<string>",
"width": "<string>"
},
"padding": "<string>",
"title": {
"color": "<string>",
"fontFamily": "<string>",
"fontSize": "<string>",
"fontWeight": "<string>"
}
},
"dashboard": {
"backgroundColor": "<string>",
"padding": "<string>"
},
"fontFamily": "<string>",
"primaryColor": "<string>",
"themeId": "<string>",
"widgets": {
"backgroundColor": "<string>",
"border": {
"color": "<string>",
"radius": "<string>",
"style": "<string>",
"width": "<string>"
},
"margin": "<string>",
"padding": "<string>",
"text": {
"codeFontFamily": "<string>",
"color": "<string>",
"fontFamily": "<string>",
"secondaryColor": "<string>"
},
"title": {
"color": "<string>",
"fontFamily": "<string>",
"fontSize": "<string>",
"fontWeight": "<string>"
}
}
},
"title": "<string>"
}
}
'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}/dashboard"
payload = { "dashboardDraft": {
"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": {}
}
],
"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": {
"backgroundColor": "<string>",
"controls": {
"backgroundColor": "<string>",
"border": {
"color": "<string>",
"radius": "<string>",
"style": "<string>",
"width": "<string>"
},
"padding": "<string>",
"title": {
"color": "<string>",
"fontFamily": "<string>",
"fontSize": "<string>",
"fontWeight": "<string>"
}
},
"dashboard": {
"backgroundColor": "<string>",
"padding": "<string>"
},
"fontFamily": "<string>",
"primaryColor": "<string>",
"themeId": "<string>",
"widgets": {
"backgroundColor": "<string>",
"border": {
"color": "<string>",
"radius": "<string>",
"style": "<string>",
"width": "<string>"
},
"margin": "<string>",
"padding": "<string>",
"text": {
"codeFontFamily": "<string>",
"color": "<string>",
"fontFamily": "<string>",
"secondaryColor": "<string>"
},
"title": {
"color": "<string>",
"fontFamily": "<string>",
"fontSize": "<string>",
"fontWeight": "<string>"
}
}
},
"title": "<string>"
} }
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({
dashboardDraft: {
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: {}
}
],
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: {
backgroundColor: '<string>',
controls: {
backgroundColor: '<string>',
border: {color: '<string>', radius: '<string>', style: '<string>', width: '<string>'},
padding: '<string>',
title: {
color: '<string>',
fontFamily: '<string>',
fontSize: '<string>',
fontWeight: '<string>'
}
},
dashboard: {backgroundColor: '<string>', padding: '<string>'},
fontFamily: '<string>',
primaryColor: '<string>',
themeId: '<string>',
widgets: {
backgroundColor: '<string>',
border: {color: '<string>', radius: '<string>', style: '<string>', width: '<string>'},
margin: '<string>',
padding: '<string>',
text: {
codeFontFamily: '<string>',
color: '<string>',
fontFamily: '<string>',
secondaryColor: '<string>'
},
title: {
color: '<string>',
fontFamily: '<string>',
fontSize: '<string>',
fontWeight: '<string>'
}
}
},
title: '<string>'
}
})
};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}/dashboard', 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}/dashboard",
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([
'dashboardDraft' => [
'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' => [
]
]
],
'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' => [
'backgroundColor' => '<string>',
'controls' => [
'backgroundColor' => '<string>',
'border' => [
'color' => '<string>',
'radius' => '<string>',
'style' => '<string>',
'width' => '<string>'
],
'padding' => '<string>',
'title' => [
'color' => '<string>',
'fontFamily' => '<string>',
'fontSize' => '<string>',
'fontWeight' => '<string>'
]
],
'dashboard' => [
'backgroundColor' => '<string>',
'padding' => '<string>'
],
'fontFamily' => '<string>',
'primaryColor' => '<string>',
'themeId' => '<string>',
'widgets' => [
'backgroundColor' => '<string>',
'border' => [
'color' => '<string>',
'radius' => '<string>',
'style' => '<string>',
'width' => '<string>'
],
'margin' => '<string>',
'padding' => '<string>',
'text' => [
'codeFontFamily' => '<string>',
'color' => '<string>',
'fontFamily' => '<string>',
'secondaryColor' => '<string>'
],
'title' => [
'color' => '<string>',
'fontFamily' => '<string>',
'fontSize' => '<string>',
'fontWeight' => '<string>'
]
]
],
'title' => '<string>'
]
]),
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}/dashboard"
payload := strings.NewReader("{\n \"dashboardDraft\": {\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"position\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"config\": {},\n \"responsiveLayouts\": {\n \"lg\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"md\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"sm\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xxs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n }\n },\n \"style\": {}\n }\n ],\n \"description\": \"<string>\",\n \"layout\": {\n \"breakpoints\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"cols\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"containerPadding\": [\n 123\n ],\n \"margin\": [\n 123\n ],\n \"rowHeight\": 123\n },\n \"settings\": {},\n \"theme\": {\n \"backgroundColor\": \"<string>\",\n \"controls\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"padding\": \"<string>\",\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n },\n \"dashboard\": {\n \"backgroundColor\": \"<string>\",\n \"padding\": \"<string>\"\n },\n \"fontFamily\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"themeId\": \"<string>\",\n \"widgets\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"margin\": \"<string>\",\n \"padding\": \"<string>\",\n \"text\": {\n \"codeFontFamily\": \"<string>\",\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"secondaryColor\": \"<string>\"\n },\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n }\n },\n \"title\": \"<string>\"\n }\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}/dashboard")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dashboardDraft\": {\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"position\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"config\": {},\n \"responsiveLayouts\": {\n \"lg\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"md\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"sm\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xxs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n }\n },\n \"style\": {}\n }\n ],\n \"description\": \"<string>\",\n \"layout\": {\n \"breakpoints\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"cols\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"containerPadding\": [\n 123\n ],\n \"margin\": [\n 123\n ],\n \"rowHeight\": 123\n },\n \"settings\": {},\n \"theme\": {\n \"backgroundColor\": \"<string>\",\n \"controls\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"padding\": \"<string>\",\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n },\n \"dashboard\": {\n \"backgroundColor\": \"<string>\",\n \"padding\": \"<string>\"\n },\n \"fontFamily\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"themeId\": \"<string>\",\n \"widgets\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"margin\": \"<string>\",\n \"padding\": \"<string>\",\n \"text\": {\n \"codeFontFamily\": \"<string>\",\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"secondaryColor\": \"<string>\"\n },\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n }\n },\n \"title\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/workbooks/{workbookId}/dashboard")
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 \"dashboardDraft\": {\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"position\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"config\": {},\n \"responsiveLayouts\": {\n \"lg\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"md\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"sm\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n },\n \"xxs\": {\n \"h\": 123,\n \"w\": 123,\n \"x\": 123,\n \"y\": 123\n }\n },\n \"style\": {}\n }\n ],\n \"description\": \"<string>\",\n \"layout\": {\n \"breakpoints\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"cols\": {\n \"lg\": 123,\n \"md\": 123,\n \"sm\": 123,\n \"xs\": 123,\n \"xxs\": 123\n },\n \"containerPadding\": [\n 123\n ],\n \"margin\": [\n 123\n ],\n \"rowHeight\": 123\n },\n \"settings\": {},\n \"theme\": {\n \"backgroundColor\": \"<string>\",\n \"controls\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"padding\": \"<string>\",\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n },\n \"dashboard\": {\n \"backgroundColor\": \"<string>\",\n \"padding\": \"<string>\"\n },\n \"fontFamily\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"themeId\": \"<string>\",\n \"widgets\": {\n \"backgroundColor\": \"<string>\",\n \"border\": {\n \"color\": \"<string>\",\n \"radius\": \"<string>\",\n \"style\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"margin\": \"<string>\",\n \"padding\": \"<string>\",\n \"text\": {\n \"codeFontFamily\": \"<string>\",\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"secondaryColor\": \"<string>\"\n },\n \"title\": {\n \"color\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"fontWeight\": \"<string>\"\n }\n }\n },\n \"title\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"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": {}
}
]
}
}Authorizations
Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.
Body
application/json
WorkbookDashboardInput
Show child attributes
Show child attributes
⌘I