Then please mark my original answers as correct.
I tried to update the value with requests.put but failed.
You are now changing topics to a different subject to your original question, but I’ll answer it this time.
It’s not clear if you’re trying to change the configuration of the gadget by remotely altering the filter or project it is using, or if you’re trying to somehow change the ‘name’ that the gadget shows for that filter or project.
You also seem to be confusing functionality provided by the UI with the functionality provided by the REST API.
First, you’re not taking the time to read the documentation properly. The Set dashboard item property endpoint documentation says that you just provide the value in the request body, nothing else, so it would be:
r.json(): "Random new name here"
Next, if you do use the REST API to change the name property, then look at the bubble chart in the UI, you’ll see its functionality didn’t change. If you then edit the gadget and look at its configuration, you’ll see the name is what you set it as!!. This is because, behind the scenes, it is the id of the filter or project is what is really is being used to display content, and the name of that filter or project is provided in the UI as a subsequent by-product, for aesthetic reasons, since nobody using the UI would know what ‘102345’ means.
In summary, you can’t change the name property and expect the gadget’s functionality to change, only what is shown in the UI. You should set the id property, using a valid project or filter id, if you want to change the functionality.
Here’s a good experiment. Use the Set dashboard item property endpoint to set a property called hiddenProperty to the value “I’m not visible”, then use the Get dashboard item property keys endpoint to lookup all the property keys and their values. The new property and its value will be there. Then go to the UI, inspect the configuration of the gadget and see if you can find it anywhere.
Try doing some experiments with your API test tool to try different combinations for these sorts of requests and their values, then observing the resulting effect on the gadget in the UI first, rather than jumping to conclusions and immediately asking for help.
Have fun. Bye.