KB Article #178480

How to change Database Connection credentials directly from API Gateway runtime.


Customer wanted to change and deploy External Database Connection directly from API Gateway , without using PolicyStudio being a constraint of their project.


Copy the attached script in /PATH/apigateway/samples/scripts/config/
cd /PATH/apigateway/samples/scripts/
./run.sh ./config/changeDBcreds.py --service "Instance_Name" --group "Group_Name"

Enter username: admin
Enter password: ********
Changing the database credentials for 'Default Database Connection'
Enter new DB username: adminuser
Enter new DB password: *****

Enter credentials for admin node manager first and then new credentials for the Default Database Connection which is hard coded but could also be a prompt in the jython script.
This does require running from a machine with API gateway runtime.
In the provided script you'll have to change the name of the Default Database Connection with yours. (For example:instead of "mine" use the name of your database connection )