IoT Stadium

API Documentation

Widget

Widget - PUT Update Widget

Put

{{url_iot_backend}}/ext/dashboards/:dashboardId/widgets/:id
{
	"key": "Content-Type",
	"value": "application/json"
},
{
	"key": "Authorization",
	"value": "Bearer {{token}}"
},

Parameter

Field Type Description
widget_name String

Name of the widget

description String

Optional description

width Integer

Width in grid columns (2 to 12). Affects display size

height Integer

Height in pixels. Min: 150, Max: 600

widget_type String

Widget type

data_source Array

Array of data sources for the widget

data_source[].label String

Display name on the widget

data_source[].min_value Number

Required for bar-gauge or gauge types

data_source[].max_value Number

Required for bar-gauge or gauge types

data_source[].device_id Integer

The ID of the device providing the telemetry

data_source[].telemetry_key String

Key from device telemetry

data_source[].unit String

Unit to display

{
    "message": "dashboard updated",
    "data": {
        "id": "810"
    },
    "code": 200
}
{
    "message": "Invalid Message",
    "code": 400,
    "errors": [
        {
            "field": "widget_name",
            "message": "The widget name field is required.."
        }
    ]
}