Create Widget Info in Dashboard - IoT Cloud API

daleonpz Posts: 1
edited April 2023 in IoT Forum
We're developing an application using the IoT Cloud API. 
We want to add to our dashboard a widget, where one can read sensor information. For example, something like this
|  Sensor Info:                                 |
|             Name:  Temperature       |
|             S/N:  1564897                  |
|             Vendor:  My Company     |
I tried with Text type. This is my json structure in python
headers = {'Content-type': 'application/json'}
        payload = {
            "action": "create",
            "payload": {
                "dashboardId": dashboard_id,
                "name": "IO-Link-System Info",
                "type": 10,
                "metrics": [
                                    "Name":  "Temperature",
                                    "SerialNumber":  **Please do not post TeamViewer IDs**,
                                    "Company":     "my company"
                "layout": layout_position
but I got an error response from the API.
I could create Chart widget, with no problem.
Could you give me some hints about how I create this type of widget with your API?


  • mircea_c
    mircea_c Posts: 146 Staff member 🤠

    Hi @daleonpz

    It seems that the layout is not correct. Should be something like:

    "layout": {
    "width": 2,
    "height": 6

    Also, can you share the error message?



    Tech Support IoT