Datasource API not working

i am using the api/datasources API to create a datasource in my garfana, it is correctly configuring all the details but the mysql password. i am using the following syntax of json while posting
“name”: “My MySQL Data Source”,
“type”: “mysql”,
“access”: “proxy”,
“url”: “tcp://localhost:3306”,
“database”: “mydatabase”,
“user”: “myusername”,
“password”: “mypassword”,
“jsonData”: {
“timeInterval”: “5m”
i am using mysql and i also want to authenticate mysql using its credentials

1 Like

Note: Similar to creating a data source, password and basicAuthPassword should be defined under secureJsonData in order to be stored securely as an encrypted blob in the database. Then, the encrypted fields are listed under secureJsonFields section in the response.

Of course you might be right - you didn’t specify a version, but password (secretes) were moved to secureJsonData a few years ago.