curl --request POST \
--url https://api.eu.bronto.io/widgets \
--header 'Content-Type: application/json' \
--header 'X-BRONTO-API-KEY: <api-key>' \
--data '
{
"name": "5xx errors by service",
"type": "treemap",
"description": "This widget shows the 5xx errors by service",
"aux": {},
"sources": [
{
"type": "metric",
"id": "7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d"
},
{
"type": "slo",
"id": "91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e"
}
],
"metric_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"widget_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.eu.bronto.io/widgets"
payload = {
"name": "5xx errors by service",
"type": "treemap",
"description": "This widget shows the 5xx errors by service",
"aux": {},
"sources": [
{
"type": "metric",
"id": "7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d"
},
{
"type": "slo",
"id": "91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e"
}
],
"metric_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"widget_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"X-BRONTO-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-BRONTO-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '5xx errors by service',
type: 'treemap',
description: 'This widget shows the 5xx errors by service',
aux: {},
sources: [
{type: 'metric', id: '7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d'},
{type: 'slo', id: '91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e'}
],
metric_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
widget_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.eu.bronto.io/widgets', 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://api.eu.bronto.io/widgets",
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' => '5xx errors by service',
'type' => 'treemap',
'description' => 'This widget shows the 5xx errors by service',
'aux' => [
],
'sources' => [
[
'type' => 'metric',
'id' => '7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d'
],
[
'type' => 'slo',
'id' => '91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e'
]
],
'metric_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'widget_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BRONTO-API-KEY: <api-key>"
],
]);
$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://api.eu.bronto.io/widgets"
payload := strings.NewReader("{\n \"name\": \"5xx errors by service\",\n \"type\": \"treemap\",\n \"description\": \"This widget shows the 5xx errors by service\",\n \"aux\": {},\n \"sources\": [\n {\n \"type\": \"metric\",\n \"id\": \"7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d\"\n },\n {\n \"type\": \"slo\",\n \"id\": \"91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e\"\n }\n ],\n \"metric_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"widget_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-BRONTO-API-KEY", "<api-key>")
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://api.eu.bronto.io/widgets")
.header("X-BRONTO-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"5xx errors by service\",\n \"type\": \"treemap\",\n \"description\": \"This widget shows the 5xx errors by service\",\n \"aux\": {},\n \"sources\": [\n {\n \"type\": \"metric\",\n \"id\": \"7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d\"\n },\n {\n \"type\": \"slo\",\n \"id\": \"91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e\"\n }\n ],\n \"metric_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"widget_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.bronto.io/widgets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-BRONTO-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"5xx errors by service\",\n \"type\": \"treemap\",\n \"description\": \"This widget shows the 5xx errors by service\",\n \"aux\": {},\n \"sources\": [\n {\n \"type\": \"metric\",\n \"id\": \"7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d\"\n },\n {\n \"type\": \"slo\",\n \"id\": \"91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e\"\n }\n ],\n \"metric_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"widget_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "5xx errors by service",
"type": "area",
"sources": [
{
"type": "metric",
"id": "7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d"
},
{
"type": "monitor",
"id": "3f9e2c1a-7b4d-4e8f-9a2b-1c3d5e7f9a0b"
}
],
"aux": {},
"description": "This widget shows the 5xx errors by service",
"metric_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"widget_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"metric_labels": {},
"layout": {
"widget_layouts": [
{
"id": "78739235-9aa7-4eca-b7f3-4cf6ee455b8f",
"x": 1.25,
"y": 2,
"w": 20,
"h": 5
}
]
},
"tags": {
"region": "eu",
"environment": "production"
},
"template": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"arguments": {
"from": {
"value": {
"value": "a157b003-d5b8-4333-a3e2-7c7864300852"
}
},
"region": {
"value": {
"input": "region"
}
}
}
},
"metadata": {
"created_at": 123,
"created_by": {
"type": "API_KEY_ID",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"modified_at": 123,
"modified_by": {
"type": "API_KEY_ID",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"deleted_at": 123,
"deleted_by": {
"type": "API_KEY_ID",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"last_heartbeat_at": 1791331200000
}
}{
"code": 400,
"type": "Bad Request",
"correlation_id": "95c6a974e3ab01209b6b0dfedb1b16c5",
"details": "Validation failed: 'name' field is required and cannot be empty"
}{
"code": 404,
"type": "Not Found",
"correlation_id": "605f832bcfe44a1081441691c8d42253",
"details": "Resource not found."
}{
"code": 429,
"type": "Too Many Requests",
"correlation_id": "53909ed43c544531b7a555e295960437",
"details": "Rate limit exceeded. Maximum 100 requests are allowed within a 5-minute window."
}{
"code": 500,
"type": "Internal Server Error",
"correlation_id": "b129b8e0e66c41aa9541a30f67e38ce2",
"details": "Internal Server Error"
}{
"code": 500,
"type": "Internal Server Error",
"correlation_id": "b129b8e0e66c41aa9541a30f67e38ce2",
"details": "Internal Server Error"
}Create a widget
curl --request POST \
--url https://api.eu.bronto.io/widgets \
--header 'Content-Type: application/json' \
--header 'X-BRONTO-API-KEY: <api-key>' \
--data '
{
"name": "5xx errors by service",
"type": "treemap",
"description": "This widget shows the 5xx errors by service",
"aux": {},
"sources": [
{
"type": "metric",
"id": "7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d"
},
{
"type": "slo",
"id": "91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e"
}
],
"metric_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"widget_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.eu.bronto.io/widgets"
payload = {
"name": "5xx errors by service",
"type": "treemap",
"description": "This widget shows the 5xx errors by service",
"aux": {},
"sources": [
{
"type": "metric",
"id": "7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d"
},
{
"type": "slo",
"id": "91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e"
}
],
"metric_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"widget_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"X-BRONTO-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-BRONTO-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '5xx errors by service',
type: 'treemap',
description: 'This widget shows the 5xx errors by service',
aux: {},
sources: [
{type: 'metric', id: '7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d'},
{type: 'slo', id: '91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e'}
],
metric_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
widget_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.eu.bronto.io/widgets', 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://api.eu.bronto.io/widgets",
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' => '5xx errors by service',
'type' => 'treemap',
'description' => 'This widget shows the 5xx errors by service',
'aux' => [
],
'sources' => [
[
'type' => 'metric',
'id' => '7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d'
],
[
'type' => 'slo',
'id' => '91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e'
]
],
'metric_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'widget_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BRONTO-API-KEY: <api-key>"
],
]);
$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://api.eu.bronto.io/widgets"
payload := strings.NewReader("{\n \"name\": \"5xx errors by service\",\n \"type\": \"treemap\",\n \"description\": \"This widget shows the 5xx errors by service\",\n \"aux\": {},\n \"sources\": [\n {\n \"type\": \"metric\",\n \"id\": \"7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d\"\n },\n {\n \"type\": \"slo\",\n \"id\": \"91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e\"\n }\n ],\n \"metric_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"widget_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-BRONTO-API-KEY", "<api-key>")
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://api.eu.bronto.io/widgets")
.header("X-BRONTO-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"5xx errors by service\",\n \"type\": \"treemap\",\n \"description\": \"This widget shows the 5xx errors by service\",\n \"aux\": {},\n \"sources\": [\n {\n \"type\": \"metric\",\n \"id\": \"7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d\"\n },\n {\n \"type\": \"slo\",\n \"id\": \"91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e\"\n }\n ],\n \"metric_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"widget_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.bronto.io/widgets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-BRONTO-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"5xx errors by service\",\n \"type\": \"treemap\",\n \"description\": \"This widget shows the 5xx errors by service\",\n \"aux\": {},\n \"sources\": [\n {\n \"type\": \"metric\",\n \"id\": \"7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d\"\n },\n {\n \"type\": \"slo\",\n \"id\": \"91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e\"\n }\n ],\n \"metric_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"widget_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "5xx errors by service",
"type": "area",
"sources": [
{
"type": "metric",
"id": "7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d"
},
{
"type": "monitor",
"id": "3f9e2c1a-7b4d-4e8f-9a2b-1c3d5e7f9a0b"
}
],
"aux": {},
"description": "This widget shows the 5xx errors by service",
"metric_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"widget_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"metric_labels": {},
"layout": {
"widget_layouts": [
{
"id": "78739235-9aa7-4eca-b7f3-4cf6ee455b8f",
"x": 1.25,
"y": 2,
"w": 20,
"h": 5
}
]
},
"tags": {
"region": "eu",
"environment": "production"
},
"template": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"arguments": {
"from": {
"value": {
"value": "a157b003-d5b8-4333-a3e2-7c7864300852"
}
},
"region": {
"value": {
"input": "region"
}
}
}
},
"metadata": {
"created_at": 123,
"created_by": {
"type": "API_KEY_ID",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"modified_at": 123,
"modified_by": {
"type": "API_KEY_ID",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"deleted_at": 123,
"deleted_by": {
"type": "API_KEY_ID",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"last_heartbeat_at": 1791331200000
}
}{
"code": 400,
"type": "Bad Request",
"correlation_id": "95c6a974e3ab01209b6b0dfedb1b16c5",
"details": "Validation failed: 'name' field is required and cannot be empty"
}{
"code": 404,
"type": "Not Found",
"correlation_id": "605f832bcfe44a1081441691c8d42253",
"details": "Resource not found."
}{
"code": 429,
"type": "Too Many Requests",
"correlation_id": "53909ed43c544531b7a555e295960437",
"details": "Rate limit exceeded. Maximum 100 requests are allowed within a 5-minute window."
}{
"code": 500,
"type": "Internal Server Error",
"correlation_id": "b129b8e0e66c41aa9541a30f67e38ce2",
"details": "Internal Server Error"
}{
"code": 500,
"type": "Internal Server Error",
"correlation_id": "b129b8e0e66c41aa9541a30f67e38ce2",
"details": "Internal Server Error"
}Authorizations
Body
The widget name
1 - 255"5xx errors by service"
The widget type
1 - 64"treemap"
The widget description
1 - 1024"This widget shows the 5xx errors by service"
Additional widget configuration
The metrics, monitors and SLOs that supply data to the widget, in display order.
Used by every widget type except group. Cannot be combined with metric_ids or widget_ids.
20Show child attributes
Show child attributes
[
{
"type": "metric",
"id": "7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d"
},
{
"type": "slo",
"id": "91bd5a3e-2c4f-4d6a-8b0c-2e4f6a8c0d1e"
}
]
Deprecated on 2026-10-12 and will be removed on 2027-10-12: use sources
with type: metric. Requests using this field receive Deprecation and
Sunset response headers. Each ID is stored as
{type: metric, id}. Cannot be combined with sources or widget_ids.
20The child widget IDs of a group widget. Required for group widgets and
must be omitted for all other widget types. Cannot be combined with sources or metric_ids.
50Response
Widget created successfully
A widget. A group widget contains other widgets (widget_ids, positioned by layout);
every other widget type gets its data from sources. A widget never has both sources and widget_ids.
The name of the Widget.
"5xx errors by service"
The type of the Widget.
area, bar, donut, events-list, geomap, group, line, pie, score, table, top-list, treemap The metrics, monitors and SLOs that supply data to the widget, in display order.
Empty for group widgets.
Show child attributes
Show child attributes
[
{
"type": "metric",
"id": "7a1c4e2b-0d3f-4a5b-8c6d-9e0f1a2b3c4d"
},
{
"type": "monitor",
"id": "3f9e2c1a-7b4d-4e8f-9a2b-1c3d5e7f9a0b"
}
]
Additional widget configuration
Show child attributes
Show child attributes
A description of the widget
"This widget shows the 5xx errors by service"
Deprecated on 2026-10-12 and will be removed on 2027-10-12: use sources.
Contains only the IDs of sources entries whose type is metric.
The child widget IDs of a group widget. Empty for all other widget types.
Display labels for the widget's metrics, keyed by metric ID
Show child attributes
Show child attributes
The positions of the child widgets of a group widget, keyed by child widget ID.
widget_layouts is empty for all other widget types.
Show child attributes
Show child attributes
{
"widget_layouts": [
{
"id": "78739235-9aa7-4eca-b7f3-4cf6ee455b8f",
"x": 1.25,
"y": 2,
"w": 20,
"h": 5
}
]
}
A map of key value pairs associated with the resource
Show child attributes
Show child attributes
{
"region": "eu",
"environment": "production"
}
Show child attributes
Show child attributes
Common metadata attached to all persisted resources.
Show child attributes
Show child attributes
