Clone a dashboard with new device

hello
i’ve see and test that with NodeRed i can create a bucket and add property_value on device ,

but if i want creare a new dashboard (every time i create a new device), or cloning a main dashboard there is any way to do this ?

On nodeRed there is no node to do CREATE_DASHBOARD ,but i’ve test with basic node HTTP_request that i can use API with Bearer auth , but i don’t undersand how i can i copy a dashboard that already exist to create a new .

Inside every DASHBOARDs on Setting there is JSON structure and if i copy it and add
“dashboard”: “t2”,
“description”: “t2”,

to

{
  "dashboard": "t2",
  "description": "t2", 
  "name": "t2",
  "project": [
    "azzurrodante@essetiprj"
  ],
  "properties": {
    "columns": 6,
    "row_height": 40
  },
  "tabs": [
    {
      "icon": "fas fa-tachometer-alt",
      "name": "testcreate",
      "widgets": [
        {
          "data": {
            "device_property": {
              "device": "352818660852954",
              "mapping": "button",
              "property": "prop01",
              "user": "azzurrodante"
            },
            "source": "device_property"
          },
          "layout": {
            "col": 0,
            "row": 0,
            "sizeX": 1,
            "sizeY": 3
          },
          "panel": {
            "color": "#ffffff"
          },
          "properties": {
            "style": "switch"
          },
          "type": "boolean"
        }
      ]
    }
  ]
}

and insert it on
/v1/users/{user}/dashboards on swagger , i get error

“error”: {
“message”: “Object contains a property that could not be validated using ‘properties’ or ‘additionalProperties’ constraints: ‘project’.”

i’ve tested that if i remove
“project”: [

  • “azzurrodante@essetiprj”*
  • ],*

inside JSON structure
with API and http request , i can create a new dashboard .

it work , but now withouth project setting , user inside project can’t see this dashboard .

there is mode to set project on dashboard ?

best regards
Dante

i’ve find now that there is
**API **
/v1/users/{user}/dashboards/{dashboard}/projects
to set projects

now it work !!

best regards
Dante

Hi @secur_lab

You may benefit from the Source Switcher feature as a way to keep the dashboard count low. This way, one dashboard can be used with multiple devices or buckets and changes will affect all data sources.