cURL
curl -X POST "https://api.joinformal.com/core.v1.DashboardService/CreateDashboard" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"example": "value"
}'fetch("https://api.joinformal.com/core.v1.DashboardService/CreateDashboard", {
method: "POST",
headers: {
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
example: "value"
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));import requests
url = "https://api.joinformal.com/core.v1.DashboardService/CreateDashboard"
headers = {
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"example": "value"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.joinformal.com/core.v1.DashboardService/CreateDashboard"
body := map[string]string{
"example": "value",
}
jsonData, _ := json.Marshal(body)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("X-API-KEY", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
responseBody, _ := io.ReadAll(resp.Body)
fmt.Println(string(responseBody))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.joinformal.com/core.v1.DashboardService/CreateDashboard",
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([
'definition' => [
'layout' => [
'columns' => 2
],
'widgets' => [
[
'key' => '<string>',
'title' => '<string>',
'description' => '<string>',
'layout' => [
'span' => 2
],
'aiUsage' => [
],
'logs' => [
'query' => '<string>',
'groupBy' => [
'<string>'
],
'display' => [
'limit' => 100,
'excludeOther' => true,
'stacked' => true
],
'measure' => [
'field' => '<string>',
'percent' => 50,
'missing' => 123
]
],
'note' => [
'markdown' => '<string>'
]
]
]
],
'name' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.joinformal.com/core.v1.DashboardService/CreateDashboard")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"definition\": {\n \"layout\": {\n \"columns\": 2\n },\n \"widgets\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"layout\": {\n \"span\": 2\n },\n \"aiUsage\": {},\n \"logs\": {\n \"query\": \"<string>\",\n \"groupBy\": [\n \"<string>\"\n ],\n \"display\": {\n \"limit\": 100,\n \"excludeOther\": true,\n \"stacked\": true\n },\n \"measure\": {\n \"field\": \"<string>\",\n \"percent\": 50,\n \"missing\": 123\n }\n },\n \"note\": {\n \"markdown\": \"<string>\"\n }\n }\n ]\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.joinformal.com/core.v1.DashboardService/CreateDashboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"definition\": {\n \"layout\": {\n \"columns\": 2\n },\n \"widgets\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"layout\": {\n \"span\": 2\n },\n \"aiUsage\": {},\n \"logs\": {\n \"query\": \"<string>\",\n \"groupBy\": [\n \"<string>\"\n ],\n \"display\": {\n \"limit\": 100,\n \"excludeOther\": true,\n \"stacked\": true\n },\n \"measure\": {\n \"field\": \"<string>\",\n \"percent\": 50,\n \"missing\": 123\n }\n },\n \"note\": {\n \"markdown\": \"<string>\"\n }\n }\n ]\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"dashboard": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"definition": {
"layout": {
"columns": 2
},
"defaultTimeRange": "DASHBOARD_TIME_RANGE_UNSPECIFIED",
"widgets": [
{
"key": "<string>",
"title": "<string>",
"description": "<string>",
"layout": {
"span": 2
},
"aiUsage": {
"visualization": "DASHBOARD_VISUALIZATION_UNSPECIFIED",
"metric": "DASHBOARD_AI_METRIC_UNSPECIFIED",
"dimension": "DASHBOARD_AI_DIMENSION_UNSPECIFIED"
},
"logs": {
"visualization": "DASHBOARD_VISUALIZATION_UNSPECIFIED",
"query": "<string>",
"groupBy": [
"<string>"
],
"display": {
"limit": 100,
"excludeOther": true,
"defaultInterval": "DASHBOARD_INTERVAL_UNSPECIFIED",
"stacked": true
},
"measure": {
"type": "",
"field": "<string>",
"percent": 50,
"missing": 123
}
},
"note": {
"markdown": "<string>"
}
}
]
},
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z"
}
}{
"code": "invalid_request",
"message": "Invalid request parameters",
"details": {}
}{
"code": "unauthorized",
"message": "Authentication required"
}{
"code": "forbidden",
"message": "Insufficient permissions to perform this action"
}{
"code": "not_found",
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}{
"code": "not_found",
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}core.v1.DashboardService
Create dashboard
Create a dashboard from a complete definition.
POST
/
core.v1.DashboardService
/
CreateDashboard
cURL
curl -X POST "https://api.joinformal.com/core.v1.DashboardService/CreateDashboard" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"example": "value"
}'fetch("https://api.joinformal.com/core.v1.DashboardService/CreateDashboard", {
method: "POST",
headers: {
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
example: "value"
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));import requests
url = "https://api.joinformal.com/core.v1.DashboardService/CreateDashboard"
headers = {
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"example": "value"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.joinformal.com/core.v1.DashboardService/CreateDashboard"
body := map[string]string{
"example": "value",
}
jsonData, _ := json.Marshal(body)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("X-API-KEY", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
responseBody, _ := io.ReadAll(resp.Body)
fmt.Println(string(responseBody))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.joinformal.com/core.v1.DashboardService/CreateDashboard",
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([
'definition' => [
'layout' => [
'columns' => 2
],
'widgets' => [
[
'key' => '<string>',
'title' => '<string>',
'description' => '<string>',
'layout' => [
'span' => 2
],
'aiUsage' => [
],
'logs' => [
'query' => '<string>',
'groupBy' => [
'<string>'
],
'display' => [
'limit' => 100,
'excludeOther' => true,
'stacked' => true
],
'measure' => [
'field' => '<string>',
'percent' => 50,
'missing' => 123
]
],
'note' => [
'markdown' => '<string>'
]
]
]
],
'name' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.joinformal.com/core.v1.DashboardService/CreateDashboard")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"definition\": {\n \"layout\": {\n \"columns\": 2\n },\n \"widgets\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"layout\": {\n \"span\": 2\n },\n \"aiUsage\": {},\n \"logs\": {\n \"query\": \"<string>\",\n \"groupBy\": [\n \"<string>\"\n ],\n \"display\": {\n \"limit\": 100,\n \"excludeOther\": true,\n \"stacked\": true\n },\n \"measure\": {\n \"field\": \"<string>\",\n \"percent\": 50,\n \"missing\": 123\n }\n },\n \"note\": {\n \"markdown\": \"<string>\"\n }\n }\n ]\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.joinformal.com/core.v1.DashboardService/CreateDashboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"definition\": {\n \"layout\": {\n \"columns\": 2\n },\n \"widgets\": [\n {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"layout\": {\n \"span\": 2\n },\n \"aiUsage\": {},\n \"logs\": {\n \"query\": \"<string>\",\n \"groupBy\": [\n \"<string>\"\n ],\n \"display\": {\n \"limit\": 100,\n \"excludeOther\": true,\n \"stacked\": true\n },\n \"measure\": {\n \"field\": \"<string>\",\n \"percent\": 50,\n \"missing\": 123\n }\n },\n \"note\": {\n \"markdown\": \"<string>\"\n }\n }\n ]\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"dashboard": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"definition": {
"layout": {
"columns": 2
},
"defaultTimeRange": "DASHBOARD_TIME_RANGE_UNSPECIFIED",
"widgets": [
{
"key": "<string>",
"title": "<string>",
"description": "<string>",
"layout": {
"span": 2
},
"aiUsage": {
"visualization": "DASHBOARD_VISUALIZATION_UNSPECIFIED",
"metric": "DASHBOARD_AI_METRIC_UNSPECIFIED",
"dimension": "DASHBOARD_AI_DIMENSION_UNSPECIFIED"
},
"logs": {
"visualization": "DASHBOARD_VISUALIZATION_UNSPECIFIED",
"query": "<string>",
"groupBy": [
"<string>"
],
"display": {
"limit": 100,
"excludeOther": true,
"defaultInterval": "DASHBOARD_INTERVAL_UNSPECIFIED",
"stacked": true
},
"measure": {
"type": "",
"field": "<string>",
"percent": 50,
"missing": 123
}
},
"note": {
"markdown": "<string>"
}
}
]
},
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z"
}
}{
"code": "invalid_request",
"message": "Invalid request parameters",
"details": {}
}{
"code": "unauthorized",
"message": "Authentication required"
}{
"code": "forbidden",
"message": "Insufficient permissions to perform this action"
}{
"code": "not_found",
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}{
"code": "not_found",
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}Authorizations
Headers
Body
application/json
Was this page helpful?