curl --request POST \
--url http://10.2.4.166:8080/composer/api/dashboards \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--data '
{
"name": "<string>",
"description": "<string>",
"layout": "<string>",
"dashboardLayout": {},
"icon": "<string>",
"showDescription": true,
"isReportDashboard": true,
"unifiedBarCfgs": [
{
"id": "<string>",
"accountId": "<string>",
"timeControlCfg": {
"timeField": "<string>",
"from": "<string>",
"to": "<string>",
"calendarId": "<string>"
},
"playerControlCfg": {
"pauseAfterRead": true,
"stopTime": "<string>",
"speed": 123
},
"sharpeningCfg": {
"prefer": true,
"maxQueries": 123
},
"widgetIds": [
"<string>"
]
}
],
"selectedWidgetId": "<string>",
"fieldLinks": [
{
"id": "<string>",
"label": "<string>",
"mappings": [
{
"fieldName": "<string>",
"sourceId": "<string>",
"fieldType": "<string>"
}
]
}
],
"rowFilters": [
{
"sourceId": "<string>",
"path": "<string>",
"form": "<string>",
"value": "<unknown>",
"custom": {},
"label": "<string>"
}
],
"mutedLinks": [
{
"targetId": "<string>",
"widgetId": "<string>",
"direction": "publish, subscribe",
"type": "crossSource, sameSource"
}
],
"widgets": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"header": {},
"layout": {
"col": 123,
"row": 123,
"rowSpan": 123,
"colSpan": 123
},
"position": {
"relativeHeight": 123,
"relativeWidth": 123,
"verticalPosition": "<string>",
"horizontalPosition": "<string>"
},
"visualId": "<string>",
"pickers": {
"hiddenPickers": [
"<string>"
]
}
}
],
"tags": [
"<string>"
],
"originId": "<string>",
"folderId": 1111
}
'import requests
url = "http://10.2.4.166:8080/composer/api/dashboards"
payload = {
"name": "<string>",
"description": "<string>",
"layout": "<string>",
"dashboardLayout": {},
"icon": "<string>",
"showDescription": True,
"isReportDashboard": True,
"unifiedBarCfgs": [
{
"id": "<string>",
"accountId": "<string>",
"timeControlCfg": {
"timeField": "<string>",
"from": "<string>",
"to": "<string>",
"calendarId": "<string>"
},
"playerControlCfg": {
"pauseAfterRead": True,
"stopTime": "<string>",
"speed": 123
},
"sharpeningCfg": {
"prefer": True,
"maxQueries": 123
},
"widgetIds": ["<string>"]
}
],
"selectedWidgetId": "<string>",
"fieldLinks": [
{
"id": "<string>",
"label": "<string>",
"mappings": [
{
"fieldName": "<string>",
"sourceId": "<string>",
"fieldType": "<string>"
}
]
}
],
"rowFilters": [
{
"sourceId": "<string>",
"path": "<string>",
"form": "<string>",
"value": "<unknown>",
"custom": {},
"label": "<string>"
}
],
"mutedLinks": [
{
"targetId": "<string>",
"widgetId": "<string>",
"direction": "publish, subscribe",
"type": "crossSource, sameSource"
}
],
"widgets": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"header": {},
"layout": {
"col": 123,
"row": 123,
"rowSpan": 123,
"colSpan": 123
},
"position": {
"relativeHeight": 123,
"relativeWidth": 123,
"verticalPosition": "<string>",
"horizontalPosition": "<string>"
},
"visualId": "<string>",
"pickers": { "hiddenPickers": ["<string>"] }
}
],
"tags": ["<string>"],
"originId": "<string>",
"folderId": 1111
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
layout: '<string>',
dashboardLayout: {},
icon: '<string>',
showDescription: true,
isReportDashboard: true,
unifiedBarCfgs: [
{
id: '<string>',
accountId: '<string>',
timeControlCfg: {
timeField: '<string>',
from: '<string>',
to: '<string>',
calendarId: '<string>'
},
playerControlCfg: {pauseAfterRead: true, stopTime: '<string>', speed: 123},
sharpeningCfg: {prefer: true, maxQueries: 123},
widgetIds: ['<string>']
}
],
selectedWidgetId: '<string>',
fieldLinks: [
{
id: '<string>',
label: '<string>',
mappings: [{fieldName: '<string>', sourceId: '<string>', fieldType: '<string>'}]
}
],
rowFilters: [
{
sourceId: '<string>',
path: '<string>',
form: '<string>',
value: '<unknown>',
custom: {},
label: '<string>'
}
],
mutedLinks: [
{
targetId: '<string>',
widgetId: '<string>',
direction: 'publish, subscribe',
type: 'crossSource, sameSource'
}
],
widgets: [
{
id: '<string>',
name: '<string>',
description: '<string>',
header: {},
layout: {col: 123, row: 123, rowSpan: 123, colSpan: 123},
position: {
relativeHeight: 123,
relativeWidth: 123,
verticalPosition: '<string>',
horizontalPosition: '<string>'
},
visualId: '<string>',
pickers: {hiddenPickers: ['<string>']}
}
],
tags: ['<string>'],
originId: '<string>',
folderId: 1111
})
};
fetch('http://10.2.4.166:8080/composer/api/dashboards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://10.2.4.166:8080/composer/api/dashboards",
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([
'name' => '<string>',
'description' => '<string>',
'layout' => '<string>',
'dashboardLayout' => [
],
'icon' => '<string>',
'showDescription' => true,
'isReportDashboard' => true,
'unifiedBarCfgs' => [
[
'id' => '<string>',
'accountId' => '<string>',
'timeControlCfg' => [
'timeField' => '<string>',
'from' => '<string>',
'to' => '<string>',
'calendarId' => '<string>'
],
'playerControlCfg' => [
'pauseAfterRead' => true,
'stopTime' => '<string>',
'speed' => 123
],
'sharpeningCfg' => [
'prefer' => true,
'maxQueries' => 123
],
'widgetIds' => [
'<string>'
]
]
],
'selectedWidgetId' => '<string>',
'fieldLinks' => [
[
'id' => '<string>',
'label' => '<string>',
'mappings' => [
[
'fieldName' => '<string>',
'sourceId' => '<string>',
'fieldType' => '<string>'
]
]
]
],
'rowFilters' => [
[
'sourceId' => '<string>',
'path' => '<string>',
'form' => '<string>',
'value' => '<unknown>',
'custom' => [
],
'label' => '<string>'
]
],
'mutedLinks' => [
[
'targetId' => '<string>',
'widgetId' => '<string>',
'direction' => 'publish, subscribe',
'type' => 'crossSource, sameSource'
]
],
'widgets' => [
[
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'header' => [
],
'layout' => [
'col' => 123,
'row' => 123,
'rowSpan' => 123,
'colSpan' => 123
],
'position' => [
'relativeHeight' => 123,
'relativeWidth' => 123,
'verticalPosition' => '<string>',
'horizontalPosition' => '<string>'
],
'visualId' => '<string>',
'pickers' => [
'hiddenPickers' => [
'<string>'
]
]
]
],
'tags' => [
'<string>'
],
'originId' => '<string>',
'folderId' => 1111
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/vnd.composer.v3+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 := "http://10.2.4.166:8080/composer/api/dashboards"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"layout\": \"<string>\",\n \"dashboardLayout\": {},\n \"icon\": \"<string>\",\n \"showDescription\": true,\n \"isReportDashboard\": true,\n \"unifiedBarCfgs\": [\n {\n \"id\": \"<string>\",\n \"accountId\": \"<string>\",\n \"timeControlCfg\": {\n \"timeField\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"calendarId\": \"<string>\"\n },\n \"playerControlCfg\": {\n \"pauseAfterRead\": true,\n \"stopTime\": \"<string>\",\n \"speed\": 123\n },\n \"sharpeningCfg\": {\n \"prefer\": true,\n \"maxQueries\": 123\n },\n \"widgetIds\": [\n \"<string>\"\n ]\n }\n ],\n \"selectedWidgetId\": \"<string>\",\n \"fieldLinks\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"mappings\": [\n {\n \"fieldName\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fieldType\": \"<string>\"\n }\n ]\n }\n ],\n \"rowFilters\": [\n {\n \"sourceId\": \"<string>\",\n \"path\": \"<string>\",\n \"form\": \"<string>\",\n \"value\": \"<unknown>\",\n \"custom\": {},\n \"label\": \"<string>\"\n }\n ],\n \"mutedLinks\": [\n {\n \"targetId\": \"<string>\",\n \"widgetId\": \"<string>\",\n \"direction\": \"publish, subscribe\",\n \"type\": \"crossSource, sameSource\"\n }\n ],\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"header\": {},\n \"layout\": {\n \"col\": 123,\n \"row\": 123,\n \"rowSpan\": 123,\n \"colSpan\": 123\n },\n \"position\": {\n \"relativeHeight\": 123,\n \"relativeWidth\": 123,\n \"verticalPosition\": \"<string>\",\n \"horizontalPosition\": \"<string>\"\n },\n \"visualId\": \"<string>\",\n \"pickers\": {\n \"hiddenPickers\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"originId\": \"<string>\",\n \"folderId\": 1111\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/vnd.composer.v3+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://10.2.4.166:8080/composer/api/dashboards")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"layout\": \"<string>\",\n \"dashboardLayout\": {},\n \"icon\": \"<string>\",\n \"showDescription\": true,\n \"isReportDashboard\": true,\n \"unifiedBarCfgs\": [\n {\n \"id\": \"<string>\",\n \"accountId\": \"<string>\",\n \"timeControlCfg\": {\n \"timeField\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"calendarId\": \"<string>\"\n },\n \"playerControlCfg\": {\n \"pauseAfterRead\": true,\n \"stopTime\": \"<string>\",\n \"speed\": 123\n },\n \"sharpeningCfg\": {\n \"prefer\": true,\n \"maxQueries\": 123\n },\n \"widgetIds\": [\n \"<string>\"\n ]\n }\n ],\n \"selectedWidgetId\": \"<string>\",\n \"fieldLinks\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"mappings\": [\n {\n \"fieldName\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fieldType\": \"<string>\"\n }\n ]\n }\n ],\n \"rowFilters\": [\n {\n \"sourceId\": \"<string>\",\n \"path\": \"<string>\",\n \"form\": \"<string>\",\n \"value\": \"<unknown>\",\n \"custom\": {},\n \"label\": \"<string>\"\n }\n ],\n \"mutedLinks\": [\n {\n \"targetId\": \"<string>\",\n \"widgetId\": \"<string>\",\n \"direction\": \"publish, subscribe\",\n \"type\": \"crossSource, sameSource\"\n }\n ],\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"header\": {},\n \"layout\": {\n \"col\": 123,\n \"row\": 123,\n \"rowSpan\": 123,\n \"colSpan\": 123\n },\n \"position\": {\n \"relativeHeight\": 123,\n \"relativeWidth\": 123,\n \"verticalPosition\": \"<string>\",\n \"horizontalPosition\": \"<string>\"\n },\n \"visualId\": \"<string>\",\n \"pickers\": {\n \"hiddenPickers\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"originId\": \"<string>\",\n \"folderId\": 1111\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/dashboards")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"layout\": \"<string>\",\n \"dashboardLayout\": {},\n \"icon\": \"<string>\",\n \"showDescription\": true,\n \"isReportDashboard\": true,\n \"unifiedBarCfgs\": [\n {\n \"id\": \"<string>\",\n \"accountId\": \"<string>\",\n \"timeControlCfg\": {\n \"timeField\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"calendarId\": \"<string>\"\n },\n \"playerControlCfg\": {\n \"pauseAfterRead\": true,\n \"stopTime\": \"<string>\",\n \"speed\": 123\n },\n \"sharpeningCfg\": {\n \"prefer\": true,\n \"maxQueries\": 123\n },\n \"widgetIds\": [\n \"<string>\"\n ]\n }\n ],\n \"selectedWidgetId\": \"<string>\",\n \"fieldLinks\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"mappings\": [\n {\n \"fieldName\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fieldType\": \"<string>\"\n }\n ]\n }\n ],\n \"rowFilters\": [\n {\n \"sourceId\": \"<string>\",\n \"path\": \"<string>\",\n \"form\": \"<string>\",\n \"value\": \"<unknown>\",\n \"custom\": {},\n \"label\": \"<string>\"\n }\n ],\n \"mutedLinks\": [\n {\n \"targetId\": \"<string>\",\n \"widgetId\": \"<string>\",\n \"direction\": \"publish, subscribe\",\n \"type\": \"crossSource, sameSource\"\n }\n ],\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"header\": {},\n \"layout\": {\n \"col\": 123,\n \"row\": 123,\n \"rowSpan\": 123,\n \"colSpan\": 123\n },\n \"position\": {\n \"relativeHeight\": 123,\n \"relativeWidth\": 123,\n \"verticalPosition\": \"<string>\",\n \"horizontalPosition\": \"<string>\"\n },\n \"visualId\": \"<string>\",\n \"pickers\": {\n \"hiddenPickers\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"originId\": \"<string>\",\n \"folderId\": 1111\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": "<string>",
"description": "<string>",
"layout": "<string>",
"dashboardLayout": {},
"icon": "<string>",
"showDescription": true,
"isReportDashboard": true,
"unifiedBarCfgs": [
{
"id": "<string>",
"accountId": "<string>",
"timeControlCfg": {
"timeField": "<string>",
"from": "<string>",
"to": "<string>",
"calendarId": "<string>"
},
"playerControlCfg": {
"timeWindowScale": "PINNED",
"pauseAfterRead": true,
"stopTime": "<string>",
"speed": 123
},
"sharpeningCfg": {
"prefer": true,
"maxQueries": 123
},
"widgetIds": [
"<string>"
]
}
],
"selectedWidgetId": "<string>",
"fieldLinks": [
{
"id": "<string>",
"label": "<string>",
"mappings": [
{
"fieldName": "<string>",
"sourceId": "<string>",
"fieldType": "<string>"
}
]
}
],
"rowFilters": [
{
"sourceId": "<string>",
"path": "<string>",
"form": "<string>",
"operation": "EQUALS",
"value": "<unknown>",
"custom": {},
"label": "<string>"
}
],
"mutedLinks": [
{
"targetId": "<string>",
"widgetId": "<string>",
"direction": "publish, subscribe",
"type": "crossSource, sameSource"
}
],
"creatorName": "<string>",
"creatorFullName": "<string>",
"widgets": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"header": {
"visibility": "VISIBLE"
},
"layout": {
"col": 123,
"row": 123,
"rowSpan": 123,
"colSpan": 123
},
"position": {
"relativeHeight": 123,
"relativeWidth": 123,
"verticalPosition": "<string>",
"horizontalPosition": "<string>"
},
"visualId": "<string>",
"dashboardLink": {
"dashboardId": "<string>",
"dashboardName": "<string>",
"inheritFilterCfg": true
},
"content": {
"contentType": "VISUAL",
"visualId": "<string>",
"snippetId": "<string>"
},
"pickers": {
"hiddenPickers": [
"<string>"
],
"visibility": "CUSTOM"
}
}
],
"tags": [
"<string>"
],
"interactivityProfile": {
"name": "<string>",
"type": "SYSTEM",
"overrideVisualInteractivity": true,
"settings": {},
"visualSettings": {}
},
"originId": "<string>",
"projectId": 2222,
"folderId": 1111,
"reportDetails": {
"reportType": "RAW_DATA_TABLE",
"id": "<string>"
},
"createdByUserID": "<string>",
"lastModifiedByUserID": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"error": "<string>",
"message": "<string>",
"path": "<string>"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}Creates a new dashboard (requires the ROLE_CREATE_DASHBOARDS privilege)
curl --request POST \
--url http://10.2.4.166:8080/composer/api/dashboards \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--data '
{
"name": "<string>",
"description": "<string>",
"layout": "<string>",
"dashboardLayout": {},
"icon": "<string>",
"showDescription": true,
"isReportDashboard": true,
"unifiedBarCfgs": [
{
"id": "<string>",
"accountId": "<string>",
"timeControlCfg": {
"timeField": "<string>",
"from": "<string>",
"to": "<string>",
"calendarId": "<string>"
},
"playerControlCfg": {
"pauseAfterRead": true,
"stopTime": "<string>",
"speed": 123
},
"sharpeningCfg": {
"prefer": true,
"maxQueries": 123
},
"widgetIds": [
"<string>"
]
}
],
"selectedWidgetId": "<string>",
"fieldLinks": [
{
"id": "<string>",
"label": "<string>",
"mappings": [
{
"fieldName": "<string>",
"sourceId": "<string>",
"fieldType": "<string>"
}
]
}
],
"rowFilters": [
{
"sourceId": "<string>",
"path": "<string>",
"form": "<string>",
"value": "<unknown>",
"custom": {},
"label": "<string>"
}
],
"mutedLinks": [
{
"targetId": "<string>",
"widgetId": "<string>",
"direction": "publish, subscribe",
"type": "crossSource, sameSource"
}
],
"widgets": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"header": {},
"layout": {
"col": 123,
"row": 123,
"rowSpan": 123,
"colSpan": 123
},
"position": {
"relativeHeight": 123,
"relativeWidth": 123,
"verticalPosition": "<string>",
"horizontalPosition": "<string>"
},
"visualId": "<string>",
"pickers": {
"hiddenPickers": [
"<string>"
]
}
}
],
"tags": [
"<string>"
],
"originId": "<string>",
"folderId": 1111
}
'import requests
url = "http://10.2.4.166:8080/composer/api/dashboards"
payload = {
"name": "<string>",
"description": "<string>",
"layout": "<string>",
"dashboardLayout": {},
"icon": "<string>",
"showDescription": True,
"isReportDashboard": True,
"unifiedBarCfgs": [
{
"id": "<string>",
"accountId": "<string>",
"timeControlCfg": {
"timeField": "<string>",
"from": "<string>",
"to": "<string>",
"calendarId": "<string>"
},
"playerControlCfg": {
"pauseAfterRead": True,
"stopTime": "<string>",
"speed": 123
},
"sharpeningCfg": {
"prefer": True,
"maxQueries": 123
},
"widgetIds": ["<string>"]
}
],
"selectedWidgetId": "<string>",
"fieldLinks": [
{
"id": "<string>",
"label": "<string>",
"mappings": [
{
"fieldName": "<string>",
"sourceId": "<string>",
"fieldType": "<string>"
}
]
}
],
"rowFilters": [
{
"sourceId": "<string>",
"path": "<string>",
"form": "<string>",
"value": "<unknown>",
"custom": {},
"label": "<string>"
}
],
"mutedLinks": [
{
"targetId": "<string>",
"widgetId": "<string>",
"direction": "publish, subscribe",
"type": "crossSource, sameSource"
}
],
"widgets": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"header": {},
"layout": {
"col": 123,
"row": 123,
"rowSpan": 123,
"colSpan": 123
},
"position": {
"relativeHeight": 123,
"relativeWidth": 123,
"verticalPosition": "<string>",
"horizontalPosition": "<string>"
},
"visualId": "<string>",
"pickers": { "hiddenPickers": ["<string>"] }
}
],
"tags": ["<string>"],
"originId": "<string>",
"folderId": 1111
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
layout: '<string>',
dashboardLayout: {},
icon: '<string>',
showDescription: true,
isReportDashboard: true,
unifiedBarCfgs: [
{
id: '<string>',
accountId: '<string>',
timeControlCfg: {
timeField: '<string>',
from: '<string>',
to: '<string>',
calendarId: '<string>'
},
playerControlCfg: {pauseAfterRead: true, stopTime: '<string>', speed: 123},
sharpeningCfg: {prefer: true, maxQueries: 123},
widgetIds: ['<string>']
}
],
selectedWidgetId: '<string>',
fieldLinks: [
{
id: '<string>',
label: '<string>',
mappings: [{fieldName: '<string>', sourceId: '<string>', fieldType: '<string>'}]
}
],
rowFilters: [
{
sourceId: '<string>',
path: '<string>',
form: '<string>',
value: '<unknown>',
custom: {},
label: '<string>'
}
],
mutedLinks: [
{
targetId: '<string>',
widgetId: '<string>',
direction: 'publish, subscribe',
type: 'crossSource, sameSource'
}
],
widgets: [
{
id: '<string>',
name: '<string>',
description: '<string>',
header: {},
layout: {col: 123, row: 123, rowSpan: 123, colSpan: 123},
position: {
relativeHeight: 123,
relativeWidth: 123,
verticalPosition: '<string>',
horizontalPosition: '<string>'
},
visualId: '<string>',
pickers: {hiddenPickers: ['<string>']}
}
],
tags: ['<string>'],
originId: '<string>',
folderId: 1111
})
};
fetch('http://10.2.4.166:8080/composer/api/dashboards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://10.2.4.166:8080/composer/api/dashboards",
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([
'name' => '<string>',
'description' => '<string>',
'layout' => '<string>',
'dashboardLayout' => [
],
'icon' => '<string>',
'showDescription' => true,
'isReportDashboard' => true,
'unifiedBarCfgs' => [
[
'id' => '<string>',
'accountId' => '<string>',
'timeControlCfg' => [
'timeField' => '<string>',
'from' => '<string>',
'to' => '<string>',
'calendarId' => '<string>'
],
'playerControlCfg' => [
'pauseAfterRead' => true,
'stopTime' => '<string>',
'speed' => 123
],
'sharpeningCfg' => [
'prefer' => true,
'maxQueries' => 123
],
'widgetIds' => [
'<string>'
]
]
],
'selectedWidgetId' => '<string>',
'fieldLinks' => [
[
'id' => '<string>',
'label' => '<string>',
'mappings' => [
[
'fieldName' => '<string>',
'sourceId' => '<string>',
'fieldType' => '<string>'
]
]
]
],
'rowFilters' => [
[
'sourceId' => '<string>',
'path' => '<string>',
'form' => '<string>',
'value' => '<unknown>',
'custom' => [
],
'label' => '<string>'
]
],
'mutedLinks' => [
[
'targetId' => '<string>',
'widgetId' => '<string>',
'direction' => 'publish, subscribe',
'type' => 'crossSource, sameSource'
]
],
'widgets' => [
[
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'header' => [
],
'layout' => [
'col' => 123,
'row' => 123,
'rowSpan' => 123,
'colSpan' => 123
],
'position' => [
'relativeHeight' => 123,
'relativeWidth' => 123,
'verticalPosition' => '<string>',
'horizontalPosition' => '<string>'
],
'visualId' => '<string>',
'pickers' => [
'hiddenPickers' => [
'<string>'
]
]
]
],
'tags' => [
'<string>'
],
'originId' => '<string>',
'folderId' => 1111
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/vnd.composer.v3+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 := "http://10.2.4.166:8080/composer/api/dashboards"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"layout\": \"<string>\",\n \"dashboardLayout\": {},\n \"icon\": \"<string>\",\n \"showDescription\": true,\n \"isReportDashboard\": true,\n \"unifiedBarCfgs\": [\n {\n \"id\": \"<string>\",\n \"accountId\": \"<string>\",\n \"timeControlCfg\": {\n \"timeField\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"calendarId\": \"<string>\"\n },\n \"playerControlCfg\": {\n \"pauseAfterRead\": true,\n \"stopTime\": \"<string>\",\n \"speed\": 123\n },\n \"sharpeningCfg\": {\n \"prefer\": true,\n \"maxQueries\": 123\n },\n \"widgetIds\": [\n \"<string>\"\n ]\n }\n ],\n \"selectedWidgetId\": \"<string>\",\n \"fieldLinks\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"mappings\": [\n {\n \"fieldName\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fieldType\": \"<string>\"\n }\n ]\n }\n ],\n \"rowFilters\": [\n {\n \"sourceId\": \"<string>\",\n \"path\": \"<string>\",\n \"form\": \"<string>\",\n \"value\": \"<unknown>\",\n \"custom\": {},\n \"label\": \"<string>\"\n }\n ],\n \"mutedLinks\": [\n {\n \"targetId\": \"<string>\",\n \"widgetId\": \"<string>\",\n \"direction\": \"publish, subscribe\",\n \"type\": \"crossSource, sameSource\"\n }\n ],\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"header\": {},\n \"layout\": {\n \"col\": 123,\n \"row\": 123,\n \"rowSpan\": 123,\n \"colSpan\": 123\n },\n \"position\": {\n \"relativeHeight\": 123,\n \"relativeWidth\": 123,\n \"verticalPosition\": \"<string>\",\n \"horizontalPosition\": \"<string>\"\n },\n \"visualId\": \"<string>\",\n \"pickers\": {\n \"hiddenPickers\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"originId\": \"<string>\",\n \"folderId\": 1111\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/vnd.composer.v3+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://10.2.4.166:8080/composer/api/dashboards")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"layout\": \"<string>\",\n \"dashboardLayout\": {},\n \"icon\": \"<string>\",\n \"showDescription\": true,\n \"isReportDashboard\": true,\n \"unifiedBarCfgs\": [\n {\n \"id\": \"<string>\",\n \"accountId\": \"<string>\",\n \"timeControlCfg\": {\n \"timeField\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"calendarId\": \"<string>\"\n },\n \"playerControlCfg\": {\n \"pauseAfterRead\": true,\n \"stopTime\": \"<string>\",\n \"speed\": 123\n },\n \"sharpeningCfg\": {\n \"prefer\": true,\n \"maxQueries\": 123\n },\n \"widgetIds\": [\n \"<string>\"\n ]\n }\n ],\n \"selectedWidgetId\": \"<string>\",\n \"fieldLinks\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"mappings\": [\n {\n \"fieldName\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fieldType\": \"<string>\"\n }\n ]\n }\n ],\n \"rowFilters\": [\n {\n \"sourceId\": \"<string>\",\n \"path\": \"<string>\",\n \"form\": \"<string>\",\n \"value\": \"<unknown>\",\n \"custom\": {},\n \"label\": \"<string>\"\n }\n ],\n \"mutedLinks\": [\n {\n \"targetId\": \"<string>\",\n \"widgetId\": \"<string>\",\n \"direction\": \"publish, subscribe\",\n \"type\": \"crossSource, sameSource\"\n }\n ],\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"header\": {},\n \"layout\": {\n \"col\": 123,\n \"row\": 123,\n \"rowSpan\": 123,\n \"colSpan\": 123\n },\n \"position\": {\n \"relativeHeight\": 123,\n \"relativeWidth\": 123,\n \"verticalPosition\": \"<string>\",\n \"horizontalPosition\": \"<string>\"\n },\n \"visualId\": \"<string>\",\n \"pickers\": {\n \"hiddenPickers\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"originId\": \"<string>\",\n \"folderId\": 1111\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/dashboards")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"layout\": \"<string>\",\n \"dashboardLayout\": {},\n \"icon\": \"<string>\",\n \"showDescription\": true,\n \"isReportDashboard\": true,\n \"unifiedBarCfgs\": [\n {\n \"id\": \"<string>\",\n \"accountId\": \"<string>\",\n \"timeControlCfg\": {\n \"timeField\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"calendarId\": \"<string>\"\n },\n \"playerControlCfg\": {\n \"pauseAfterRead\": true,\n \"stopTime\": \"<string>\",\n \"speed\": 123\n },\n \"sharpeningCfg\": {\n \"prefer\": true,\n \"maxQueries\": 123\n },\n \"widgetIds\": [\n \"<string>\"\n ]\n }\n ],\n \"selectedWidgetId\": \"<string>\",\n \"fieldLinks\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"mappings\": [\n {\n \"fieldName\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fieldType\": \"<string>\"\n }\n ]\n }\n ],\n \"rowFilters\": [\n {\n \"sourceId\": \"<string>\",\n \"path\": \"<string>\",\n \"form\": \"<string>\",\n \"value\": \"<unknown>\",\n \"custom\": {},\n \"label\": \"<string>\"\n }\n ],\n \"mutedLinks\": [\n {\n \"targetId\": \"<string>\",\n \"widgetId\": \"<string>\",\n \"direction\": \"publish, subscribe\",\n \"type\": \"crossSource, sameSource\"\n }\n ],\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"header\": {},\n \"layout\": {\n \"col\": 123,\n \"row\": 123,\n \"rowSpan\": 123,\n \"colSpan\": 123\n },\n \"position\": {\n \"relativeHeight\": 123,\n \"relativeWidth\": 123,\n \"verticalPosition\": \"<string>\",\n \"horizontalPosition\": \"<string>\"\n },\n \"visualId\": \"<string>\",\n \"pickers\": {\n \"hiddenPickers\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"originId\": \"<string>\",\n \"folderId\": 1111\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": "<string>",
"description": "<string>",
"layout": "<string>",
"dashboardLayout": {},
"icon": "<string>",
"showDescription": true,
"isReportDashboard": true,
"unifiedBarCfgs": [
{
"id": "<string>",
"accountId": "<string>",
"timeControlCfg": {
"timeField": "<string>",
"from": "<string>",
"to": "<string>",
"calendarId": "<string>"
},
"playerControlCfg": {
"timeWindowScale": "PINNED",
"pauseAfterRead": true,
"stopTime": "<string>",
"speed": 123
},
"sharpeningCfg": {
"prefer": true,
"maxQueries": 123
},
"widgetIds": [
"<string>"
]
}
],
"selectedWidgetId": "<string>",
"fieldLinks": [
{
"id": "<string>",
"label": "<string>",
"mappings": [
{
"fieldName": "<string>",
"sourceId": "<string>",
"fieldType": "<string>"
}
]
}
],
"rowFilters": [
{
"sourceId": "<string>",
"path": "<string>",
"form": "<string>",
"operation": "EQUALS",
"value": "<unknown>",
"custom": {},
"label": "<string>"
}
],
"mutedLinks": [
{
"targetId": "<string>",
"widgetId": "<string>",
"direction": "publish, subscribe",
"type": "crossSource, sameSource"
}
],
"creatorName": "<string>",
"creatorFullName": "<string>",
"widgets": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"header": {
"visibility": "VISIBLE"
},
"layout": {
"col": 123,
"row": 123,
"rowSpan": 123,
"colSpan": 123
},
"position": {
"relativeHeight": 123,
"relativeWidth": 123,
"verticalPosition": "<string>",
"horizontalPosition": "<string>"
},
"visualId": "<string>",
"dashboardLink": {
"dashboardId": "<string>",
"dashboardName": "<string>",
"inheritFilterCfg": true
},
"content": {
"contentType": "VISUAL",
"visualId": "<string>",
"snippetId": "<string>"
},
"pickers": {
"hiddenPickers": [
"<string>"
],
"visibility": "CUSTOM"
}
}
],
"tags": [
"<string>"
],
"interactivityProfile": {
"name": "<string>",
"type": "SYSTEM",
"overrideVisualInteractivity": true,
"settings": {},
"visualSettings": {}
},
"originId": "<string>",
"projectId": 2222,
"folderId": 1111,
"reportDetails": {
"reportType": "RAW_DATA_TABLE",
"id": "<string>"
},
"createdByUserID": "<string>",
"lastModifiedByUserID": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"error": "<string>",
"message": "<string>",
"path": "<string>"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}Authorizations
HTTP Basic authentication using global administrator credentials (username and password).
Query Parameters
The response to this API endpoint may return a validation error with a list of problems. Each problem has a level (ERROR, WARNING). Passing suppressWarnings=true will suppress all warnings and the request will succeed if there are no errors
Body
Defines a dashboard payload
Defines a dashboard name
255Defines a dashboard description
Defines a dashboard layout
(experimental) Defines a responsive dashboard layout
Show child attributes
Show child attributes
Defines a dashboard icon
Enables dashboard description in order to show
Defines whether dashboard is of type report
Defines unified controls configuration of a dashboard
Show child attributes
Show child attributes
Defines an identifier of the selected widget
Defines field links
Show child attributes
Show child attributes
(deprecated since 7.4, to be removed in 8.x) Defines row filters
Show child attributes
Show child attributes
(experimental) Defines muted links
Show child attributes
Show child attributes
Defines widgets
Show child attributes
Show child attributes
Defines tags. Note: Tags are not supported as a sort parameter in the pagination API.
Id of the exported dashboard
Optional folder ID for organizing the dashboard within a project.
1111
Defines self service report details of the dashboard
Show child attributes
Show child attributes
Response
The dashboard was created successfully
Defines a dashboard payload
Defines a dashboard name
255Defines a dashboard identifier
Defines a dashboard description
Defines a dashboard layout
(experimental) Defines a responsive dashboard layout
Show child attributes
Show child attributes
Defines a dashboard icon
Enables dashboard description in order to show
Defines whether dashboard is of type report
Defines unified controls configuration of a dashboard
Show child attributes
Show child attributes
Defines an identifier of the selected widget
Defines field links
Show child attributes
Show child attributes
(deprecated since 7.4, to be removed in 8.x) Defines row filters
Show child attributes
Show child attributes
(experimental) Defines muted links
Show child attributes
Show child attributes
Defines an dashboard author name
Defines a dashboard author full name
Defines widgets
Show child attributes
Show child attributes
Defines tags. Note: Tags are not supported as a sort parameter in the pagination API.
(experimental) Defines a dashboard interactivity profile
Show child attributes
Show child attributes
Id of the exported dashboard
Project ID where this dashboard is organized. This field is read-only and only.
2222
Optional folder ID for organizing the dashboard within a project.
1111
Defines self service report details of the dashboard
Show child attributes
Show child attributes
Defines a dashboard creator's identifier
Defines an identifier of the user who has modified the dashboard last
Defines a date of creation of the dashboard
Defines a date of the last modification of the dashboard
Was this page helpful?