Skip to main content
POST
Add a widget to a dashboard

Authorizations

Authorization
string
header
required

A workspace API key, created in Superlog under Settings → API keys.

Path Parameters

dashboardId
string<uuid>
required

Dashboard ID.

Body

application/json
config
object
required

What the widget reads and how it shows it. source is logs or traces. filter.resourceAttrs keys may start with resource., span., log., or field.; a bare key is a resource attribute. aggregation defaults to count; other aggregations read field, which is duration or an attribute key. groupBy splits the result into series by an attribute key. display is timeseries, number, bar_list, or table. Metric widgets need metricName.

title
string
required
Required string length: 1 - 200
type
enum<string>
required

timeseries_count counts or aggregates logs or spans, timeseries_metric charts one metric, log_table and trace_table list matching logs or traces, and markdown shows text.

Available options:
timeseries_count,
timeseries_metric,
log_table,
trace_table,
markdown
layout
object

Position on a 12-column grid: x 0 to 11, w 1 to 12, and y and h in rows. Charts are usually 6 wide and 4 high, tables 12 by 6, and text 4 by 5.

Response

Created

widget
object
required