Hello!
I have a dashboard that I would like to clone for each county in my state. I have already used the api for python to create view layers and map copies with the new view layer for each county, but I'm getting stuck on cloning the dashboard. I thought I might be able to clone it using .clone_items within my organization, but now I'm thinking that's not possible since I can only find documentation on cloning between organizations. I should mention I'm asking this because my code runs without errors, but doesn't appear to be doing anything in my AGOL (I've tried using the same gis for source and target, as well as two different accounts in the same organization).
I'm definitely open to other options, but the tricky part is the item_mapping, because I want obviously the web map to be pointing at the one for the correct county, but also I have a host of other widgets interacting with the layers that I want to be mapped to the view layer in the map instead of the original layer. My thought is I'll probably have to go into the JSON dictionary and replace some IDs with variables, but given my lack of experience with those I was hoping to use a more out-of-the-box solution (cloning).
I could potentially do this manually for the 29 counties, but down the line I will need to have this automated as I will need to follow the same process for all the counties AND municipalities (almost 300).
Code is attached in ZIP file and in screenshots.




