Hi, using API it is not possible to retrieve the secret but it is possible to set one. The same for MQTT Broker settings.
I understand is is for security reason but it is really important to be able to backup and restore passwords using API.
A solution could be to retrieve encrypted (salted, hashed) password with a prefix, like sha256:xxxxxxxxxxxxx and when restoring the endpoint should use the already hashed password if a matching prefix exists or set as plaintext password if not.
This way it would be possible to restore previously saved configurations and security will be always enforced.