update_widget
Update an existing widget on a New Relic dashboard by modifying its NRQL query, type, title, and advanced chart configuration.
Instructions
Update an existing widget on a dashboard.
Use the optional raw_configuration parameter to control advanced chart display settings. When provided,
it is sent as rawConfiguration to NerdGraph and takes precedence over the typed configuration.
The raw_configuration object should include nrqlQueries plus any display options.
IMPORTANT: nrqlQueries uses accountIds (array) not accountId (scalar):
"nrqlQueries": [{"accountIds": [123456], "query": "SELECT ..."}]
This is auto-populated from widget_query if omitted.
Fixed Y-Axis Range (left axis):
{"yAxisLeft": {"min": 0, "max": 500, "zero": false}}
Dual Y-Axis (second axis on right): IMPORTANT: requires the COMPLETE rawConfiguration. NR appends aggregation suffix to series names automatically (percentile() → " (99%)", average() → no suffix). Query alias should NOT include the suffix. See add_widget_to_dashboard for the full dual y-axis example.
Hide Legend:
{"legend": {"enabled": false}}
Facet - show/hide Other series:
{"facet": {"showOtherSeries": true}}
Ignore dashboard time picker:
{"platformOptions": {"ignoreTimeRange": true}}
Threshold label visibility:
{"thresholds": {"isLabelVisible": true}}
Chart line style:
{"chartStyles": {"lineInterpolation": "linear"}} (or "step", "smooth")
Note: logarithmic scale is not supported by New Relic for line/area charts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_guid | Yes | Page GUID where the widget is located | |
| widget_id | Yes | Widget ID to update | |
| widget_type | No | New widget type (line, area, bar, pie, table, billboard, etc.) | line |
| widget_query | No | New NRQL query for the widget | |
| widget_title | No | New title for the widget | |
| raw_configuration | No | Advanced chart display configuration sent as rawConfiguration to NerdGraph. Must include 'nrqlQueries' array with accountIds (array, not scalar). Supports: yAxisLeft ({min, max, zero}), yAxisRight ({zero, series:[{name}]}), legend ({enabled}), facet ({showOtherSeries}), platformOptions ({ignoreTimeRange}), thresholds ({isLabelVisible}), chartStyles ({lineInterpolation: linear/step/smooth}). Note: logarithmic scale is NOT supported. Overrides the typed configuration when provided. |