Create a new dashboard based on the provided configuration or update an existing one if the dashboard.metadata.id matches an existing dashboard.
curl --request POST \
--url https://us-east.metoro.io/api/v1/dashboards/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dashboard": {
"settings": {
"hideGlobalEnvironmentSelector": false,
"defaultTimeRange": "defaultTimeRange"
},
"metadata": {
"id": "id",
"title": "title",
"folderPath": "/dashboards/default/"
},
"content": {
"variables": [
{
"defaultValue": "defaultValue",
"overridable": true,
"name": "name",
"selectorSettings": {
"metricName": "metricName",
"attribute": "attribute"
}
},
{
"defaultValue": "defaultValue",
"overridable": true,
"name": "name",
"selectorSettings": {
"metricName": "metricName",
"attribute": "attribute"
}
}
],
"title": "title",
"widgets": []
}
}
}
'{
"id": "id"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Dashboard to create or update
Request to create or update a dashboard
Dashboard object
Show child attributes
Metadata for dashboard
Show child attributes
Unique identifier for the dashboard
Dashboard title
Path to the folder where the dashboard is stored. Must start with /dashboards/. Must end with /. The generated filesystem path will be {folderPath}{id}.
{
"id": "id",
"title": "title",
"folderPath": "/dashboards/default/"
}Widget for grouping other widgets
Show child attributes
Group title
Array of widgets in the group
Show child attributes
Type of widget
group, markdown, chart, stat, gauge, trace, log Position configuration for widget placement
Show child attributes
Type of positioning
absolute Absolute positioning coordinates. Each dashboard and a GroupWidget consists of 12 columns and 12 rows.
Show child attributes
X coordinate (0-12)
0 <= x <= 12Y coordinate (0-12)
0 <= x <= 12Width (0-12)
0 <= x <= 12Height (0-12)
0 <= x <= 12{ "w": 1, "x": 0, "h": 7, "y": 7 }Widget for displaying markdown content. Supports any markdown that is compatible with the CommonMark (https://commonmark.org/) format.
Show child attributes
Markdown content
{ "content": "content" }Widget for displaying charts
Show child attributes
Chart title
Type of chart
line, area, bar Expression timeseries data to be shown on the chart
Show child attributes
Array of MetoroQL queries
Show child attributes
MetoroQL query string
Size of the time buckets in seconds (0 for auto)
Display settings for chart visualization
Show child attributes
Label for the metric on the legend
Settings for line display
Show child attributes
Type of line
solid, dash Color of the line
Color of dots on the line
Size of dots on the line (0 for no dots)
{
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}if specified, this unit will be used instead of the backend-provided unit
{
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
}{
"metoroQLQueries": [
{
"displaySettings": {
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
},
"query": "query",
"bucketSize": 5
},
{
"displaySettings": {
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
},
"query": "query",
"bucketSize": 5
}
]
}Display settings for chart widget visualization
Show child attributes
Threshold settings for chart visualization
Show child attributes
Array of threshold steps
Show child attributes
Threshold value
Color in hex format for this threshold level
Name for this threshold level
{
"thresholds": {
"steps": [
{
"value": 50,
"color": "#2DD881",
"name": "Low"
},
{
"value": 80,
"color": "#FFFF00",
"name": "Medium"
},
{
"value": 90,
"color": "#FF0000",
"name": "High"
}
]
}
}{
"expression": {
"metoroQLQueries": [
{
"displaySettings": {
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
},
"query": "query",
"bucketSize": 5
},
{
"displaySettings": {
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
},
"query": "query",
"bucketSize": 5
}
]
},
"chartType": "line",
"title": "title",
"displaySettings": {
"thresholds": {
"steps": [
{
"value": 50,
"color": "#2DD881",
"name": "Low"
},
{
"value": 80,
"color": "#FFFF00",
"name": "Medium"
},
{
"value": 90,
"color": "#FF0000",
"name": "High"
}
]
}
}
}Widget for displaying statistics
Show child attributes
Stat title
Query expression for stat data
Show child attributes
Aggregation method
max, min, avg, sum, count Query configuration for MetoroQL
Show child attributes
MetoroQL query string
Size of the time buckets in seconds (0 for auto)
Display settings for chart visualization
Show child attributes
Label for the metric on the legend
Settings for line display
Show child attributes
Type of line
solid, dash Color of the line
Color of dots on the line
Size of dots on the line (0 for no dots)
{
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}if specified, this unit will be used instead of the backend-provided unit
{
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
}{
"displaySettings": {
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
},
"query": "query",
"bucketSize": 5
}{
"reduceAggregation": "max",
"metoroQLQuery": {
"displaySettings": {
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
},
"query": "query",
"bucketSize": 5
}
}Display settings for stat widget
Show child attributes
Settings for value display
Show child attributes
Operators for matching conditions
Show child attributes
Comparison operator
greaterThan, lessThan, greaterThanOrEqual, lessThanOrEqual, equals, notEquals, range Threshold value for comparison (used with operators other than 'range')
Range values for comparison when operator is 'range'
Color settings for matches
{ "color": "color", "type": "text" }Format string for value display
"$value cores used"
Settings for columns
Show child attributes
Column identifier
Display title for column
Whether column is hidden by default
Regex pattern for extracting values
Global display settings
Show child attributes
Precision for numeric values
Font size for display
text-xs, text-sm, text-base, text-lg, text-xl, text-2xl Column that can be filtered
Optional unit override for the displayed value.
{
"unitOverride": "ms",
"valuePrecision": 9,
"filterableColumn": "filterableColumn",
"fontSize": "text-xs"
}{
"globalSettings": {
"valuePrecision": 9,
"filterableColumn": "filterableColumn",
"fontSize": "text-xs"
},
"valueSettings": [
{
"formatSpecifier": "$value cores used",
"colorSettings": { "color": "color", "type": "text" },
"matchingOperators": [
{ "threshold": 7, "operator": "greaterThan" },
{ "threshold": 7, "operator": "greaterThan" }
]
},
{
"formatSpecifier": "$value cores used",
"colorSettings": { "color": "color", "type": "text" },
"matchingOperators": [
{ "threshold": 7, "operator": "greaterThan" },
{ "threshold": 7, "operator": "greaterThan" }
]
}
],
"columnSettings": [
{
"hiddenByDefault": true,
"column": "column",
"regexExtractor": "regexExtractor",
"title": "title"
},
{
"hiddenByDefault": true,
"column": "column",
"regexExtractor": "regexExtractor",
"title": "title"
}
]
}{
"expression": {
"reduceAggregation": "max",
"metoroQLQuery": { "query": "query", "bucketSize": 5 }
},
"displaySettings": {
"globalSettings": {
"valuePrecision": 9,
"filterableColumn": "filterableColumn",
"fontSize": "text-xs"
},
"valueSettings": [
{
"formatSpecifier": "$value cores used",
"colorSettings": { "color": "color", "type": "text" },
"matchingOperators": [
{ "threshold": 7, "operator": "greaterThan" },
{ "threshold": 7, "operator": "greaterThan" }
]
},
{
"formatSpecifier": "$value cores used",
"colorSettings": { "color": "color", "type": "text" },
"matchingOperators": [
{ "threshold": 7, "operator": "greaterThan" },
{ "threshold": 7, "operator": "greaterThan" }
]
}
],
"columnSettings": [
{
"hiddenByDefault": true,
"column": "column",
"regexExtractor": "regexExtractor",
"title": "title"
},
{
"hiddenByDefault": true,
"column": "column",
"regexExtractor": "regexExtractor",
"title": "title"
}
]
},
"title": "title"
}Widget for displaying gauge metrics
Show child attributes
Gauge title
Query expression for gauge data
Show child attributes
Aggregation method
max, min, avg, sum, count Query configuration for MetoroQL
Show child attributes
MetoroQL query string
Size of the time buckets in seconds (0 for auto)
Display settings for chart visualization
Show child attributes
Label for the metric on the legend
Settings for line display
Show child attributes
Type of line
solid, dash Color of the line
Color of dots on the line
Size of dots on the line (0 for no dots)
{
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}if specified, this unit will be used instead of the backend-provided unit
{
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
}{
"displaySettings": {
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
},
"query": "query",
"bucketSize": 5
}{
"reduceAggregation": "max",
"metoroQLQuery": { "query": "query", "bucketSize": 5 }
}Display settings for gauge widget
Show child attributes
Global display settings for gauge widget
Show child attributes
Precision for numeric values
Minimum value for gauge
Maximum value for gauge
Label for the gauge
When true, display raw value instead of percentage
Optional unit override for the displayed value
{
"valuePrecision": 9,
"min": 0,
"max": 100,
"label": "Gauge Label",
"showAbsoluteValue": false,
"unitOverride": "ms"
}{
"globalSettings": {
"valuePrecision": 9,
"min": 0,
"max": 100,
"label": "Gauge Label"
}
}{
"expression": {
"reduceAggregation": "max",
"metoroQLQuery": { "query": "query", "bucketSize": 5 }
},
"displaySettings": {
"globalSettings": {
"valuePrecision": 9,
"min": 0,
"max": 100,
"label": "Gauge Label"
}
},
"title": "title"
}Widget for displaying trace data
Show child attributes
Trace widget title
Query expression for trace data
Show child attributes
Query configuration for MetoroQL
Show child attributes
MetoroQL query string
Size of the time buckets in seconds (0 for auto)
Display settings for chart visualization
Show child attributes
Label for the metric on the legend
Settings for line display
Show child attributes
Type of line
solid, dash Color of the line
Color of dots on the line
Size of dots on the line (0 for no dots)
{
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}if specified, this unit will be used instead of the backend-provided unit
{
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
}{
"displaySettings": {
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
},
"query": "query",
"bucketSize": 5
}{
"metoroQLQuery": {
"query": "traces{service.name=\"api\"}",
"bucketSize": 5
}
}Display settings for trace widget
{
"hideSearchBar": false,
"columns": ["time", "traceId", "service.name"]
}{
"expression": {
"metoroQLQuery": {
"query": "traces{service.name=\"api\"}",
"bucketSize": 5
}
},
"displaySettings": {
"hideSearchBar": false,
"columns": ["time", "traceId", "service.name", "status"]
},
"title": "API Traces"
}Widget for displaying log data
Show child attributes
Log widget title
Query expression for log data
Show child attributes
Query configuration for MetoroQL
Show child attributes
MetoroQL query string
Size of the time buckets in seconds (0 for auto)
Display settings for chart visualization
Show child attributes
Label for the metric on the legend
Settings for line display
Show child attributes
Type of line
solid, dash Color of the line
Color of dots on the line
Size of dots on the line (0 for no dots)
{
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}if specified, this unit will be used instead of the backend-provided unit
{
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
}{
"displaySettings": {
"label": "label",
"lineSettings": {
"lineDotSize": 2,
"lineType": "solid",
"lineColour": "lineColour",
"lineDotColor": "lineDotColor"
}
},
"query": "query",
"bucketSize": 5
}{
"metoroQLQuery": {
"query": "logs{level=\"error\"}",
"bucketSize": 5
}
}Display settings for log widget
{
"hideSearchBar": false,
"columns": ["level", "message", "timestamp"]
}{
"expression": {
"metoroQLQuery": {
"query": "logs{level=\"error\"}",
"bucketSize": 5
}
},
"displaySettings": {
"hideSearchBar": false,
"columns": ["level", "message", "timestamp"]
},
"title": "Error Logs"
}Variables available in this group
Show child attributes
Name of the variable
Whether this variable can be overridden
Default value for this variable
Show child attributes
Settings for dynamic variable value selection
Show child attributes
{
"selectorQueries": ["avg(container_info)"],
"attributeKey": "attribute"
}{
"variables": [
{
"defaultValue": "defaultValue",
"overridable": true,
"name": "name",
"selectorSettings": {
"metricName": "metricName",
"attribute": "attribute"
}
},
{
"defaultValue": "defaultValue",
"overridable": true,
"name": "name",
"selectorSettings": {
"metricName": "metricName",
"attribute": "attribute"
}
}
],
"title": "title",
"widgets": []
}Dashboard-wide settings
{
"hideGlobalEnvironmentSelector": false,
"defaultTimeRange": "defaultTimeRange"
}{
"settings": {
"hideGlobalEnvironmentSelector": false,
"defaultTimeRange": "defaultTimeRange"
},
"metadata": {
"id": "id",
"title": "title",
"folderPath": "/dashboards/default/"
},
"content": {
"variables": [
{
"defaultValue": "defaultValue",
"overridable": true,
"name": "name",
"selectorSettings": {
"metricName": "metricName",
"attribute": "attribute"
}
},
{
"defaultValue": "defaultValue",
"overridable": true,
"name": "name",
"selectorSettings": {
"metricName": "metricName",
"attribute": "attribute"
}
}
],
"title": "title",
"widgets": []
}
}Dashboard created or updated successfully
Response from creating or updating a dashboard
Unique identifier of the created/updated dashboard
Was this page helpful?
curl --request POST \
--url https://us-east.metoro.io/api/v1/dashboards/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dashboard": {
"settings": {
"hideGlobalEnvironmentSelector": false,
"defaultTimeRange": "defaultTimeRange"
},
"metadata": {
"id": "id",
"title": "title",
"folderPath": "/dashboards/default/"
},
"content": {
"variables": [
{
"defaultValue": "defaultValue",
"overridable": true,
"name": "name",
"selectorSettings": {
"metricName": "metricName",
"attribute": "attribute"
}
},
{
"defaultValue": "defaultValue",
"overridable": true,
"name": "name",
"selectorSettings": {
"metricName": "metricName",
"attribute": "attribute"
}
}
],
"title": "title",
"widgets": []
}
}
}
'{
"id": "id"
}