I am trying to modify an existing dashboard using arcgis.apps.dashboard Python module, but I am unable to create the Dashboard object from an existing item. I was searching for examples, but all documents I have seen only have directions how to create new dashboards.
I am attempting to save all older dashboards to the new version 47+ using the Py API. I was hoping I can create the dashboard object from the existing older version of the dashboard and then use the .save() function.
How can I modify an existing dashboard?
The following code will fail, as it appears the Dashboard object does not allow passing in the item object from gis.content.get()
dashboard = Dashboard(item)
TypeError: __init__() takes 1 positional argument but 2 were given
from arcgis.apps.dashboard import Dashboard
item = gis.content.get("123456789abcdefgetc")
dashboard = Dashboard(item)
print (dashboard.title)