Dashboards API
Create Dashboard
Create a dashboard on a team. team_id is in the body because there is no row to read it from yet; every other dashboard call takes only the id in the path. tabs sets up the initial tab structure and each tab's widgets list must be empty: widgets are created against an existing dashboard, so a new one has nothing to place yet. Create the widgets against the dashboard, then place them with the tabs field on PUT /v2/dashboards/{id}. Note the shape differs across the three calls: tabs is a bare list at the root of the create body and of the GET response, but a wrapper object ({"tabs": [...]}) on update. A GET response is therefore not a create body -- to clone a dashboard, wrap its tabs for the update call, and empty their widgets lists for the create call. Excluded from the generated MCP tools: Catalyst changes dashboards through staged, human-published change sets, and an auto-generated tool would be an unstaged second path to the same rows.
POST
/
v2
/
dashboards
Create Dashboard
curl --request POST \
--url https://public.api.serval.com/v2/dashboards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"teamId": "<string>",
"name": "<string>",
"description": "<string>",
"tabs": [
{
"key": "<string>",
"name": "<string>",
"widgets": [
{
"widgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": 1,
"y": 1,
"w": 6,
"h": 64
}
]
}
],
"variables": [
{
"name": "<string>",
"timeRange": {
"defaultFrom": "<string>",
"defaultTo": "<string>"
}
}
]
}
'import requests
url = "https://public.api.serval.com/v2/dashboards"
payload = {
"teamId": "<string>",
"name": "<string>",
"description": "<string>",
"tabs": [
{
"key": "<string>",
"name": "<string>",
"widgets": [
{
"widgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": 1,
"y": 1,
"w": 6,
"h": 64
}
]
}
],
"variables": [
{
"name": "<string>",
"timeRange": {
"defaultFrom": "<string>",
"defaultTo": "<string>"
}
}
]
}
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({
teamId: '<string>',
name: '<string>',
description: '<string>',
tabs: [
{
key: '<string>',
name: '<string>',
widgets: [{widgetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', x: 1, y: 1, w: 6, h: 64}]
}
],
variables: [
{name: '<string>', timeRange: {defaultFrom: '<string>', defaultTo: '<string>'}}
]
})
};
fetch('https://public.api.serval.com/v2/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_URL => "https://public.api.serval.com/v2/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([
'teamId' => '<string>',
'name' => '<string>',
'description' => '<string>',
'tabs' => [
[
'key' => '<string>',
'name' => '<string>',
'widgets' => [
[
'widgetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'x' => 1,
'y' => 1,
'w' => 6,
'h' => 64
]
]
]
],
'variables' => [
[
'name' => '<string>',
'timeRange' => [
'defaultFrom' => '<string>',
'defaultTo' => '<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://public.api.serval.com/v2/dashboards"
payload := strings.NewReader("{\n \"teamId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tabs\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"widgets\": [\n {\n \"widgetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"x\": 1,\n \"y\": 1,\n \"w\": 6,\n \"h\": 64\n }\n ]\n }\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"timeRange\": {\n \"defaultFrom\": \"<string>\",\n \"defaultTo\": \"<string>\"\n }\n }\n ]\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://public.api.serval.com/v2/dashboards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"teamId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tabs\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"widgets\": [\n {\n \"widgetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"x\": 1,\n \"y\": 1,\n \"w\": 6,\n \"h\": 64\n }\n ]\n }\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"timeRange\": {\n \"defaultFrom\": \"<string>\",\n \"defaultTo\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.serval.com/v2/dashboards")
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 \"teamId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tabs\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"widgets\": [\n {\n \"widgetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"x\": 1,\n \"y\": 1,\n \"w\": 6,\n \"h\": 64\n }\n ]\n }\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"timeRange\": {\n \"defaultFrom\": \"<string>\",\n \"defaultTo\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"scopedId": "<string>",
"teamId": "<string>",
"name": "<string>",
"description": "<string>",
"tabs": [
{
"key": "<string>",
"name": "<string>",
"widgets": [
{
"widgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": 1,
"y": 1,
"w": 6,
"h": 64
}
]
}
],
"variables": [
{
"name": "<string>",
"type": "VARIABLE_TYPE_UNSPECIFIED",
"timeRange": {
"defaultFrom": "<string>",
"defaultTo": "<string>"
}
}
],
"createdAt": "2025-01-15T01:30:15.000Z",
"updatedAt": "2025-01-15T01:30:15.000Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
200 - application/json
Success
A dashboard owns its tabs and names each widget by id; widgets are their own resource. No list endpoint, no concurrency version.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Create Dashboard
curl --request POST \
--url https://public.api.serval.com/v2/dashboards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"teamId": "<string>",
"name": "<string>",
"description": "<string>",
"tabs": [
{
"key": "<string>",
"name": "<string>",
"widgets": [
{
"widgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": 1,
"y": 1,
"w": 6,
"h": 64
}
]
}
],
"variables": [
{
"name": "<string>",
"timeRange": {
"defaultFrom": "<string>",
"defaultTo": "<string>"
}
}
]
}
'import requests
url = "https://public.api.serval.com/v2/dashboards"
payload = {
"teamId": "<string>",
"name": "<string>",
"description": "<string>",
"tabs": [
{
"key": "<string>",
"name": "<string>",
"widgets": [
{
"widgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": 1,
"y": 1,
"w": 6,
"h": 64
}
]
}
],
"variables": [
{
"name": "<string>",
"timeRange": {
"defaultFrom": "<string>",
"defaultTo": "<string>"
}
}
]
}
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({
teamId: '<string>',
name: '<string>',
description: '<string>',
tabs: [
{
key: '<string>',
name: '<string>',
widgets: [{widgetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', x: 1, y: 1, w: 6, h: 64}]
}
],
variables: [
{name: '<string>', timeRange: {defaultFrom: '<string>', defaultTo: '<string>'}}
]
})
};
fetch('https://public.api.serval.com/v2/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_URL => "https://public.api.serval.com/v2/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([
'teamId' => '<string>',
'name' => '<string>',
'description' => '<string>',
'tabs' => [
[
'key' => '<string>',
'name' => '<string>',
'widgets' => [
[
'widgetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'x' => 1,
'y' => 1,
'w' => 6,
'h' => 64
]
]
]
],
'variables' => [
[
'name' => '<string>',
'timeRange' => [
'defaultFrom' => '<string>',
'defaultTo' => '<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://public.api.serval.com/v2/dashboards"
payload := strings.NewReader("{\n \"teamId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tabs\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"widgets\": [\n {\n \"widgetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"x\": 1,\n \"y\": 1,\n \"w\": 6,\n \"h\": 64\n }\n ]\n }\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"timeRange\": {\n \"defaultFrom\": \"<string>\",\n \"defaultTo\": \"<string>\"\n }\n }\n ]\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://public.api.serval.com/v2/dashboards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"teamId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tabs\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"widgets\": [\n {\n \"widgetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"x\": 1,\n \"y\": 1,\n \"w\": 6,\n \"h\": 64\n }\n ]\n }\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"timeRange\": {\n \"defaultFrom\": \"<string>\",\n \"defaultTo\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.serval.com/v2/dashboards")
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 \"teamId\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tabs\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"widgets\": [\n {\n \"widgetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"x\": 1,\n \"y\": 1,\n \"w\": 6,\n \"h\": 64\n }\n ]\n }\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"timeRange\": {\n \"defaultFrom\": \"<string>\",\n \"defaultTo\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"scopedId": "<string>",
"teamId": "<string>",
"name": "<string>",
"description": "<string>",
"tabs": [
{
"key": "<string>",
"name": "<string>",
"widgets": [
{
"widgetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": 1,
"y": 1,
"w": 6,
"h": 64
}
]
}
],
"variables": [
{
"name": "<string>",
"type": "VARIABLE_TYPE_UNSPECIFIED",
"timeRange": {
"defaultFrom": "<string>",
"defaultTo": "<string>"
}
}
],
"createdAt": "2025-01-15T01:30:15.000Z",
"updatedAt": "2025-01-15T01:30:15.000Z"
}
}
